From cbea4264eaf72eb8bde43a2cd8eb24103904ad0c Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Tue, 12 Sep 2023 20:53:16 +0530 Subject: [PATCH 1/3] merge master --- .env | 68 +- .github/workflows/tests.yml | 4 +- .gitmodules | 2 +- CHANGES.md | 51 +- CONTRIBUTING.md | 6 +- Dockerfile | 73 +- README-CN.md | 6 +- README.md | 8 +- SECURITY.md | 1 + app/cli.php | 27 +- app/config/cloud/contributors.json | 1 - app/config/cloud/employees.json | 33 - app/config/cloud/heroes.json | 9 - app/config/collections.php | 1823 +++++++++++++---- app/config/errors.php | 157 +- app/config/events.php | 14 + app/config/locale/templates/email-base.tpl | 30 +- .../locale/templates/email-inner-base.tpl | 15 + app/config/locale/translations/af.json | 4 +- app/config/locale/translations/ar.json | 4 +- app/config/locale/translations/as.json | 4 +- app/config/locale/translations/az.json | 4 +- app/config/locale/translations/be.json | 4 +- app/config/locale/translations/bh.json | 4 +- app/config/locale/translations/bn.json | 4 +- app/config/locale/translations/ca.json | 4 +- app/config/locale/translations/da.json | 4 +- app/config/locale/translations/de.json | 4 +- app/config/locale/translations/el.json | 4 +- app/config/locale/translations/en.json | 4 +- app/config/locale/translations/eo.json | 4 +- app/config/locale/translations/es.json | 4 +- app/config/locale/translations/fa.json | 12 +- app/config/locale/translations/fr.json | 4 +- app/config/locale/translations/ga.json | 4 +- app/config/locale/translations/gu.json | 4 +- app/config/locale/translations/he.json | 4 +- app/config/locale/translations/hi.json | 4 +- app/config/locale/translations/hr.json | 4 +- app/config/locale/translations/hu.json | 4 +- app/config/locale/translations/id.json | 4 +- app/config/locale/translations/it.json | 4 +- app/config/locale/translations/ja.json | 4 +- app/config/locale/translations/jv.json | 4 +- app/config/locale/translations/kn.json | 4 +- app/config/locale/translations/ko.json | 4 +- app/config/locale/translations/la.json | 4 +- app/config/locale/translations/lb.json | 4 +- app/config/locale/translations/lt.json | 4 +- app/config/locale/translations/lv.json | 4 +- app/config/locale/translations/ml.json | 4 +- app/config/locale/translations/mr.json | 4 +- app/config/locale/translations/ms.json | 4 +- app/config/locale/translations/nb.json | 4 +- app/config/locale/translations/ne.json | 4 +- app/config/locale/translations/nl.json | 4 +- app/config/locale/translations/nn.json | 4 +- app/config/locale/translations/or.json | 4 +- app/config/locale/translations/pl.json | 4 +- app/config/locale/translations/pt-br.json | 4 +- app/config/locale/translations/pt-pt.json | 4 +- app/config/locale/translations/ro.json | 4 +- app/config/locale/translations/ru.json | 4 +- app/config/locale/translations/sa.json | 4 +- app/config/locale/translations/sd.json | 4 +- app/config/locale/translations/si.json | 4 +- app/config/locale/translations/sk.json | 4 +- app/config/locale/translations/sn.json | 4 +- app/config/locale/translations/sv.json | 4 +- app/config/locale/translations/ta.json | 4 +- app/config/locale/translations/te.json | 4 +- app/config/locale/translations/th.json | 4 +- app/config/locale/translations/tl.json | 4 +- app/config/locale/translations/uk.json | 4 +- app/config/locale/translations/ur.json | 4 +- app/config/locale/translations/vi.json | 4 +- app/config/locale/translations/zh-cn.json | 4 +- app/config/locale/translations/zh-tw.json | 4 +- app/config/platforms.php | 30 +- app/config/providers.php | 3 +- app/config/roles.php | 19 +- app/config/runtimes.php | 2 +- app/config/scopes.php | 21 + app/config/services.php | 39 + app/config/specs/open-api3-1.4.x-client.json | 2 +- app/config/specs/open-api3-1.4.x-console.json | 2 +- app/config/specs/open-api3-1.4.x-server.json | 2 +- app/config/specs/open-api3-latest-client.json | 2 +- .../specs/open-api3-latest-console.json | 2 +- app/config/specs/open-api3-latest-server.json | 2 +- app/config/specs/swagger2-1.4.x-client.json | 2 +- app/config/specs/swagger2-1.4.x-console.json | 2 +- app/config/specs/swagger2-1.4.x-server.json | 2 +- app/config/specs/swagger2-latest-client.json | 2 +- app/config/specs/swagger2-latest-console.json | 2 +- app/config/specs/swagger2-latest-server.json | 2 +- app/config/variables.php | 247 ++- app/controllers/api/account.php | 647 ++++-- app/controllers/api/avatars.php | 29 +- app/controllers/api/console.php | 26 +- app/controllers/api/databases.php | 848 ++++---- app/controllers/api/functions.php | 1118 +++++++--- app/controllers/api/migrations.php | 992 +++++++++ app/controllers/api/project.php | 349 +++- app/controllers/api/projects.php | 580 +++--- app/controllers/api/proxy.php | 316 +++ app/controllers/api/storage.php | 351 ++-- app/controllers/api/teams.php | 122 +- app/controllers/api/users.php | 302 ++- app/controllers/api/vcs.php | 1090 ++++++++++ app/controllers/general.php | 257 ++- app/controllers/mock.php | 32 +- app/controllers/shared/api.php | 224 +- app/controllers/web/console.php | 8 + app/controllers/web/home.php | 2 +- app/http.php | 36 +- app/init.php | 257 ++- app/realtime.php | 2 +- app/views/install/compose.phtml | 285 ++- app/worker.php | 23 +- app/workers/builds.php | 540 +++-- app/workers/certificates.php | 95 +- app/workers/deletes.php | 185 +- app/workers/functions.php | 227 +- app/workers/mails.php | 37 +- app/workers/migrations.php | 308 +++ app/workers/usage.php | 288 --- bin/upgrade | 3 + bin/usage | 3 + bin/worker-migrations | 10 + bin/worker-usage | 3 - composer.json | 17 +- composer.lock | 1030 +++++++++- docker-compose.yml | 397 ++-- .../java/account/create-anonymous-session.md | 18 + .../java/account/create-email-session.md | 22 + .../java/account/create-j-w-t.md | 18 + .../account/create-magic-u-r-l-session.md | 22 + .../java/account/create-o-auth2session.md | 21 + .../java/account/create-phone-session.md | 22 + .../java/account/create-phone-verification.md | 18 + .../java/account/create-recovery.md | 22 + .../java/account/create-verification.md | 21 + .../client-android/java/account/create.md | 23 + .../java/account/delete-identity.md | 21 + .../java/account/delete-session.md | 21 + .../java/account/delete-sessions.md | 18 + .../client-android/java/account/get-prefs.md | 18 + .../java/account/get-session.md | 21 + .../1.4.x/client-android/java/account/get.md | 18 + .../java/account/list-identities.md | 20 + .../client-android/java/account/list-logs.md | 20 + .../java/account/list-sessions.md | 18 + .../java/account/update-email.md | 22 + .../account/update-magic-u-r-l-session.md | 22 + .../java/account/update-name.md | 21 + .../java/account/update-password.md | 21 + .../java/account/update-phone-session.md | 22 + .../java/account/update-phone-verification.md | 22 + .../java/account/update-phone.md | 22 + .../java/account/update-prefs.md | 21 + .../java/account/update-recovery.md | 24 + .../java/account/update-session.md | 21 + .../java/account/update-status.md | 18 + .../java/account/update-verification.md | 22 + .../java/avatars/get-browser.md | 21 + .../java/avatars/get-credit-card.md | 21 + .../java/avatars/get-favicon.md | 21 + .../client-android/java/avatars/get-flag.md | 21 + .../client-android/java/avatars/get-image.md | 21 + .../java/avatars/get-initials.md | 20 + .../client-android/java/avatars/get-q-r.md | 21 + .../java/databases/create-document.md | 24 + .../java/databases/delete-document.md | 23 + .../java/databases/get-document.md | 23 + .../java/databases/list-documents.md | 22 + .../java/databases/update-document.md | 23 + .../java/functions/create-execution.md | 21 + .../java/functions/get-execution.md | 22 + .../java/functions/list-executions.md | 21 + .../client-android/java/graphql/mutation.md | 21 + .../client-android/java/graphql/query.md | 21 + .../1.4.x/client-android/java/locale/get.md | 18 + .../client-android/java/locale/list-codes.md | 18 + .../java/locale/list-continents.md | 18 + .../java/locale/list-countries-e-u.md | 18 + .../java/locale/list-countries-phones.md | 18 + .../java/locale/list-countries.md | 18 + .../java/locale/list-currencies.md | 18 + .../java/locale/list-languages.md | 18 + .../java/storage/create-file.md | 24 + .../java/storage/delete-file.md | 22 + .../java/storage/get-file-download.md | 22 + .../java/storage/get-file-preview.md | 22 + .../java/storage/get-file-view.md | 22 + .../client-android/java/storage/get-file.md | 22 + .../client-android/java/storage/list-files.md | 21 + .../java/storage/update-file.md | 22 + .../java/teams/create-membership.md | 23 + .../1.4.x/client-android/java/teams/create.md | 22 + .../java/teams/delete-membership.md | 22 + .../1.4.x/client-android/java/teams/delete.md | 21 + .../java/teams/get-membership.md | 22 + .../client-android/java/teams/get-prefs.md | 21 + .../1.4.x/client-android/java/teams/get.md | 21 + .../java/teams/list-memberships.md | 21 + .../1.4.x/client-android/java/teams/list.md | 20 + .../java/teams/update-membership-status.md | 24 + .../java/teams/update-membership.md | 23 + .../client-android/java/teams/update-name.md | 22 + .../client-android/java/teams/update-prefs.md | 22 + .../account/create-anonymous-session.md | 10 + .../kotlin/account/create-email-session.md | 13 + .../kotlin/account/create-j-w-t.md | 10 + .../account/create-magic-u-r-l-session.md | 13 + .../kotlin/account/create-o-auth2session.md | 12 + .../kotlin/account/create-phone-session.md | 13 + .../account/create-phone-verification.md | 10 + .../kotlin/account/create-recovery.md | 13 + .../kotlin/account/create-verification.md | 12 + .../client-android/kotlin/account/create.md | 14 + .../kotlin/account/delete-identity.md | 12 + .../kotlin/account/delete-session.md | 12 + .../kotlin/account/delete-sessions.md | 10 + .../kotlin/account/get-prefs.md | 10 + .../kotlin/account/get-session.md | 12 + .../client-android/kotlin/account/get.md | 10 + .../kotlin/account/list-identities.md | 11 + .../kotlin/account/list-logs.md | 11 + .../kotlin/account/list-sessions.md | 10 + .../kotlin/account/update-email.md | 13 + .../account/update-magic-u-r-l-session.md | 13 + .../kotlin/account/update-name.md | 12 + .../kotlin/account/update-password.md | 12 + .../kotlin/account/update-phone-session.md | 13 + .../account/update-phone-verification.md | 13 + .../kotlin/account/update-phone.md | 13 + .../kotlin/account/update-prefs.md | 12 + .../kotlin/account/update-recovery.md | 15 + .../kotlin/account/update-session.md | 12 + .../kotlin/account/update-status.md | 10 + .../kotlin/account/update-verification.md | 13 + .../kotlin/avatars/get-browser.md | 12 + .../kotlin/avatars/get-credit-card.md | 12 + .../kotlin/avatars/get-favicon.md | 12 + .../client-android/kotlin/avatars/get-flag.md | 12 + .../kotlin/avatars/get-image.md | 12 + .../kotlin/avatars/get-initials.md | 11 + .../client-android/kotlin/avatars/get-q-r.md | 12 + .../kotlin/databases/create-document.md | 15 + .../kotlin/databases/delete-document.md | 14 + .../kotlin/databases/get-document.md | 14 + .../kotlin/databases/list-documents.md | 13 + .../kotlin/databases/update-document.md | 14 + .../kotlin/functions/create-execution.md | 12 + .../kotlin/functions/get-execution.md | 13 + .../kotlin/functions/list-executions.md | 12 + .../client-android/kotlin/graphql/mutation.md | 12 + .../client-android/kotlin/graphql/query.md | 12 + .../1.4.x/client-android/kotlin/locale/get.md | 10 + .../kotlin/locale/list-codes.md | 10 + .../kotlin/locale/list-continents.md | 10 + .../kotlin/locale/list-countries-e-u.md | 10 + .../kotlin/locale/list-countries-phones.md | 10 + .../kotlin/locale/list-countries.md | 10 + .../kotlin/locale/list-currencies.md | 10 + .../kotlin/locale/list-languages.md | 10 + .../kotlin/storage/create-file.md | 15 + .../kotlin/storage/delete-file.md | 13 + .../kotlin/storage/get-file-download.md | 13 + .../kotlin/storage/get-file-preview.md | 13 + .../kotlin/storage/get-file-view.md | 13 + .../client-android/kotlin/storage/get-file.md | 13 + .../kotlin/storage/list-files.md | 12 + .../kotlin/storage/update-file.md | 13 + .../kotlin/teams/create-membership.md | 14 + .../client-android/kotlin/teams/create.md | 13 + .../kotlin/teams/delete-membership.md | 13 + .../client-android/kotlin/teams/delete.md | 12 + .../kotlin/teams/get-membership.md | 13 + .../client-android/kotlin/teams/get-prefs.md | 12 + .../1.4.x/client-android/kotlin/teams/get.md | 12 + .../kotlin/teams/list-memberships.md | 12 + .../1.4.x/client-android/kotlin/teams/list.md | 11 + .../kotlin/teams/update-membership-status.md | 15 + .../kotlin/teams/update-membership.md | 14 + .../kotlin/teams/update-name.md | 13 + .../kotlin/teams/update-prefs.md | 13 + .../account/create-anonymous-session.md | 10 + .../examples/account/create-email-session.md | 13 + .../examples/account/create-j-w-t.md | 10 + .../account/create-magic-u-r-l-session.md | 13 + .../examples/account/create-o-auth2session.md | 12 + .../examples/account/create-phone-session.md | 13 + .../account/create-phone-verification.md | 10 + .../examples/account/create-recovery.md | 13 + .../examples/account/create-verification.md | 12 + .../client-apple/examples/account/create.md | 14 + .../examples/account/delete-identity.md | 12 + .../examples/account/delete-session.md | 12 + .../examples/account/delete-sessions.md | 10 + .../examples/account/get-prefs.md | 10 + .../examples/account/get-session.md | 12 + .../client-apple/examples/account/get.md | 10 + .../examples/account/list-identities.md | 10 + .../examples/account/list-logs.md | 10 + .../examples/account/list-sessions.md | 10 + .../examples/account/update-email.md | 13 + .../account/update-magic-u-r-l-session.md | 13 + .../examples/account/update-name.md | 12 + .../examples/account/update-password.md | 12 + .../examples/account/update-phone-session.md | 13 + .../account/update-phone-verification.md | 13 + .../examples/account/update-phone.md | 13 + .../examples/account/update-prefs.md | 12 + .../examples/account/update-recovery.md | 15 + .../examples/account/update-session.md | 12 + .../examples/account/update-status.md | 10 + .../examples/account/update-verification.md | 13 + .../examples/avatars/get-browser.md | 12 + .../examples/avatars/get-credit-card.md | 12 + .../examples/avatars/get-favicon.md | 12 + .../client-apple/examples/avatars/get-flag.md | 12 + .../examples/avatars/get-image.md | 12 + .../examples/avatars/get-initials.md | 10 + .../client-apple/examples/avatars/get-q-r.md | 12 + .../examples/databases/create-document.md | 15 + .../examples/databases/delete-document.md | 14 + .../examples/databases/get-document.md | 14 + .../examples/databases/list-documents.md | 13 + .../examples/databases/update-document.md | 14 + .../examples/functions/create-execution.md | 12 + .../examples/functions/get-execution.md | 13 + .../examples/functions/list-executions.md | 12 + .../client-apple/examples/graphql/mutation.md | 12 + .../client-apple/examples/graphql/query.md | 12 + .../1.4.x/client-apple/examples/locale/get.md | 10 + .../examples/locale/list-codes.md | 10 + .../examples/locale/list-continents.md | 10 + .../examples/locale/list-countries-e-u.md | 10 + .../examples/locale/list-countries-phones.md | 10 + .../examples/locale/list-countries.md | 10 + .../examples/locale/list-currencies.md | 10 + .../examples/locale/list-languages.md | 10 + .../examples/storage/create-file.md | 14 + .../examples/storage/delete-file.md | 13 + .../examples/storage/get-file-download.md | 13 + .../examples/storage/get-file-preview.md | 13 + .../examples/storage/get-file-view.md | 13 + .../client-apple/examples/storage/get-file.md | 13 + .../examples/storage/list-files.md | 12 + .../examples/storage/update-file.md | 13 + .../examples/teams/create-membership.md | 14 + .../client-apple/examples/teams/create.md | 13 + .../examples/teams/delete-membership.md | 13 + .../client-apple/examples/teams/delete.md | 12 + .../examples/teams/get-membership.md | 13 + .../client-apple/examples/teams/get-prefs.md | 12 + .../1.4.x/client-apple/examples/teams/get.md | 12 + .../examples/teams/list-memberships.md | 12 + .../1.4.x/client-apple/examples/teams/list.md | 10 + .../teams/update-membership-status.md | 15 + .../examples/teams/update-membership.md | 14 + .../examples/teams/update-name.md | 13 + .../examples/teams/update-prefs.md | 13 + .../account/create-anonymous-session.md | 19 + .../examples/account/create-email-session.md | 22 + .../examples/account/create-j-w-t.md | 19 + .../account/create-magic-u-r-l-session.md | 22 + .../examples/account/create-o-auth2session.md | 21 + .../examples/account/create-phone-session.md | 22 + .../account/create-phone-verification.md | 19 + .../examples/account/create-recovery.md | 22 + .../examples/account/create-verification.md | 21 + .../client-flutter/examples/account/create.md | 23 + .../examples/account/delete-identity.md | 21 + .../examples/account/delete-session.md | 21 + .../examples/account/delete-sessions.md | 19 + .../examples/account/get-prefs.md | 19 + .../examples/account/get-session.md | 21 + .../client-flutter/examples/account/get.md | 19 + .../examples/account/list-identities.md | 20 + .../examples/account/list-logs.md | 20 + .../examples/account/list-sessions.md | 19 + .../examples/account/update-email.md | 22 + .../account/update-magic-u-r-l-session.md | 22 + .../examples/account/update-name.md | 21 + .../examples/account/update-password.md | 21 + .../examples/account/update-phone-session.md | 22 + .../account/update-phone-verification.md | 22 + .../examples/account/update-phone.md | 22 + .../examples/account/update-prefs.md | 21 + .../examples/account/update-recovery.md | 24 + .../examples/account/update-session.md | 21 + .../examples/account/update-status.md | 19 + .../examples/account/update-verification.md | 22 + .../examples/avatars/get-browser.md | 34 + .../examples/avatars/get-credit-card.md | 34 + .../examples/avatars/get-favicon.md | 34 + .../examples/avatars/get-flag.md | 34 + .../examples/avatars/get-image.md | 34 + .../examples/avatars/get-initials.md | 32 + .../examples/avatars/get-q-r.md | 34 + .../examples/databases/create-document.md | 24 + .../examples/databases/delete-document.md | 23 + .../examples/databases/get-document.md | 23 + .../examples/databases/list-documents.md | 22 + .../examples/databases/update-document.md | 23 + .../examples/functions/create-execution.md | 21 + .../examples/functions/get-execution.md | 22 + .../examples/functions/list-executions.md | 21 + .../examples/graphql/mutation.md | 21 + .../client-flutter/examples/graphql/query.md | 21 + .../client-flutter/examples/locale/get.md | 19 + .../examples/locale/list-codes.md | 19 + .../examples/locale/list-continents.md | 19 + .../examples/locale/list-countries-e-u.md | 19 + .../examples/locale/list-countries-phones.md | 19 + .../examples/locale/list-countries.md | 19 + .../examples/locale/list-currencies.md | 19 + .../examples/locale/list-languages.md | 19 + .../examples/storage/create-file.md | 24 + .../examples/storage/delete-file.md | 22 + .../examples/storage/get-file-download.md | 36 + .../examples/storage/get-file-preview.md | 36 + .../examples/storage/get-file-view.md | 36 + .../examples/storage/get-file.md | 22 + .../examples/storage/list-files.md | 21 + .../examples/storage/update-file.md | 22 + .../examples/teams/create-membership.md | 23 + .../client-flutter/examples/teams/create.md | 22 + .../examples/teams/delete-membership.md | 22 + .../client-flutter/examples/teams/delete.md | 21 + .../examples/teams/get-membership.md | 22 + .../examples/teams/get-prefs.md | 21 + .../client-flutter/examples/teams/get.md | 21 + .../examples/teams/list-memberships.md | 21 + .../client-flutter/examples/teams/list.md | 20 + .../teams/update-membership-status.md | 24 + .../examples/teams/update-membership.md | 23 + .../examples/teams/update-name.md | 22 + .../examples/teams/update-prefs.md | 22 + .../account/create-anonymous-session.md | 29 + .../examples/account/create-email-session.md | 32 + .../examples/account/create-j-w-t.md | 5 + .../account/create-magic-u-r-l-session.md | 12 + .../examples/account/create-phone-session.md | 12 + .../account/create-phone-verification.md | 9 + .../examples/account/create-recovery.md | 12 + .../examples/account/create-verification.md | 11 + .../client-graphql/examples/account/create.md | 24 + .../examples/account/delete-identity.md | 7 + .../examples/account/delete-session.md | 7 + .../examples/account/delete-sessions.md | 5 + .../examples/account/get-prefs.md | 5 + .../examples/account/get-session.md | 31 + .../client-graphql/examples/account/get.md | 20 + .../examples/account/list-identities.md | 17 + .../examples/account/list-logs.md | 28 + .../examples/account/list-sessions.md | 32 + .../examples/account/update-email.md | 23 + .../account/update-magic-u-r-l-session.md | 32 + .../examples/account/update-name.md | 22 + .../examples/account/update-password.md | 22 + .../examples/account/update-phone-session.md | 32 + .../account/update-phone-verification.md | 12 + .../examples/account/update-phone.md | 23 + .../examples/account/update-prefs.md | 22 + .../examples/account/update-recovery.md | 14 + .../examples/account/update-session.md | 31 + .../examples/account/update-status.md | 20 + .../examples/account/update-verification.md | 12 + .../examples/avatars/get-browser.md | 7 + .../examples/avatars/get-credit-card.md | 7 + .../examples/avatars/get-favicon.md | 7 + .../examples/avatars/get-flag.md | 7 + .../examples/avatars/get-image.md | 7 + .../examples/avatars/get-initials.md | 5 + .../examples/avatars/get-q-r.md | 7 + .../examples/databases/create-document.md | 16 + .../examples/databases/delete-document.md | 9 + .../examples/databases/get-document.md | 15 + .../examples/databases/list-documents.md | 17 + .../examples/databases/update-document.md | 15 + .../examples/functions/create-execution.md | 28 + .../examples/functions/get-execution.md | 29 + .../examples/functions/list-executions.md | 31 + .../client-graphql/examples/locale/get.md | 11 + .../examples/locale/list-codes.md | 9 + .../examples/locale/list-continents.md | 9 + .../examples/locale/list-countries-e-u.md | 9 + .../examples/locale/list-countries-phones.md | 10 + .../examples/locale/list-countries.md | 9 + .../examples/locale/list-currencies.md | 14 + .../examples/locale/list-languages.md | 10 + .../examples/storage/create-file.md | 24 + .../examples/storage/delete-file.md | 8 + .../examples/storage/get-file-download.md | 8 + .../examples/storage/get-file-preview.md | 8 + .../examples/storage/get-file-view.md | 8 + .../examples/storage/get-file.md | 18 + .../examples/storage/list-files.md | 20 + .../examples/storage/update-file.md | 18 + .../examples/teams/create-membership.md | 20 + .../client-graphql/examples/teams/create.md | 15 + .../examples/teams/delete-membership.md | 8 + .../client-graphql/examples/teams/delete.md | 7 + .../examples/teams/get-membership.md | 19 + .../examples/teams/get-prefs.md | 7 + .../client-graphql/examples/teams/get.md | 14 + .../examples/teams/list-memberships.md | 21 + .../client-graphql/examples/teams/list.md | 15 + .../teams/update-membership-status.md | 21 + .../examples/teams/update-membership.md | 20 + .../examples/teams/update-name.md | 15 + .../examples/teams/update-prefs.md | 8 + .../account/create-anonymous-session.md | 6 + .../examples/account/create-email-session.md | 10 + .../examples/account/create-j-w-t.md | 6 + .../account/create-magic-u-r-l-session.md | 11 + .../examples/account/create-o-auth2session.md | 6 + .../examples/account/create-phone-session.md | 10 + .../account/create-phone-verification.md | 7 + .../examples/account/create-recovery.md | 11 + .../examples/account/create-verification.md | 10 + .../client-rest/examples/account/create.md | 12 + .../examples/account/delete-identity.md | 7 + .../examples/account/delete-session.md | 7 + .../examples/account/delete-sessions.md | 7 + .../client-rest/examples/account/get-prefs.md | 7 + .../examples/account/get-session.md | 7 + .../1.4.x/client-rest/examples/account/get.md | 7 + .../examples/account/list-identities.md | 7 + .../client-rest/examples/account/list-logs.md | 7 + .../examples/account/list-sessions.md | 7 + .../examples/account/update-email.md | 11 + .../account/update-magic-u-r-l-session.md | 10 + .../examples/account/update-name.md | 10 + .../examples/account/update-password.md | 11 + .../examples/account/update-phone-session.md | 10 + .../account/update-phone-verification.md | 11 + .../examples/account/update-phone.md | 11 + .../examples/account/update-prefs.md | 10 + .../examples/account/update-recovery.md | 13 + .../examples/account/update-session.md | 7 + .../examples/account/update-status.md | 7 + .../examples/account/update-verification.md | 11 + .../examples/avatars/get-browser.md | 7 + .../examples/avatars/get-credit-card.md | 7 + .../examples/avatars/get-favicon.md | 7 + .../client-rest/examples/avatars/get-flag.md | 7 + .../client-rest/examples/avatars/get-image.md | 7 + .../examples/avatars/get-initials.md | 7 + .../client-rest/examples/avatars/get-q-r.md | 7 + .../examples/databases/create-document.md | 12 + .../examples/databases/delete-document.md | 7 + .../examples/databases/get-document.md | 7 + .../examples/databases/list-documents.md | 7 + .../examples/databases/update-document.md | 11 + .../examples/functions/create-execution.md | 14 + .../examples/functions/get-execution.md | 7 + .../examples/functions/list-executions.md | 7 + .../client-rest/examples/graphql/mutation.md | 11 + .../client-rest/examples/graphql/query.md | 11 + .../1.4.x/client-rest/examples/locale/get.md | 7 + .../client-rest/examples/locale/list-codes.md | 7 + .../examples/locale/list-continents.md | 7 + .../examples/locale/list-countries-e-u.md | 7 + .../examples/locale/list-countries-phones.md | 7 + .../examples/locale/list-countries.md | 7 + .../examples/locale/list-currencies.md | 7 + .../examples/locale/list-languages.md | 7 + .../examples/storage/create-file.md | 25 + .../examples/storage/delete-file.md | 7 + .../examples/storage/get-file-download.md | 7 + .../examples/storage/get-file-preview.md | 7 + .../examples/storage/get-file-view.md | 7 + .../client-rest/examples/storage/get-file.md | 7 + .../examples/storage/list-files.md | 7 + .../examples/storage/update-file.md | 11 + .../examples/teams/create-membership.md | 15 + .../client-rest/examples/teams/create.md | 12 + .../examples/teams/delete-membership.md | 7 + .../client-rest/examples/teams/delete.md | 7 + .../examples/teams/get-membership.md | 7 + .../client-rest/examples/teams/get-prefs.md | 7 + .../1.4.x/client-rest/examples/teams/get.md | 7 + .../examples/teams/list-memberships.md | 7 + .../1.4.x/client-rest/examples/teams/list.md | 7 + .../teams/update-membership-status.md | 11 + .../examples/teams/update-membership.md | 10 + .../client-rest/examples/teams/update-name.md | 10 + .../examples/teams/update-prefs.md | 10 + .../account/create-anonymous-session.md | 18 + .../examples/account/create-email-session.md | 18 + .../examples/account/create-j-w-t.md | 18 + .../account/create-magic-u-r-l-session.md | 18 + .../examples/account/create-o-auth2session.md | 14 + .../examples/account/create-phone-session.md | 18 + .../account/create-phone-verification.md | 18 + .../examples/account/create-recovery.md | 18 + .../examples/account/create-verification.md | 18 + .../client-web/examples/account/create.md | 18 + .../examples/account/delete-identity.md | 18 + .../examples/account/delete-session.md | 18 + .../examples/account/delete-sessions.md | 18 + .../client-web/examples/account/get-prefs.md | 18 + .../examples/account/get-session.md | 18 + .../1.4.x/client-web/examples/account/get.md | 18 + .../examples/account/list-identities.md | 18 + .../client-web/examples/account/list-logs.md | 18 + .../examples/account/list-sessions.md | 18 + .../examples/account/update-email.md | 18 + .../account/update-magic-u-r-l-session.md | 18 + .../examples/account/update-name.md | 18 + .../examples/account/update-password.md | 18 + .../examples/account/update-phone-session.md | 18 + .../account/update-phone-verification.md | 18 + .../examples/account/update-phone.md | 18 + .../examples/account/update-prefs.md | 18 + .../examples/account/update-recovery.md | 18 + .../examples/account/update-session.md | 18 + .../examples/account/update-status.md | 18 + .../examples/account/update-verification.md | 18 + .../examples/avatars/get-browser.md | 14 + .../examples/avatars/get-credit-card.md | 14 + .../examples/avatars/get-favicon.md | 14 + .../client-web/examples/avatars/get-flag.md | 14 + .../client-web/examples/avatars/get-image.md | 14 + .../examples/avatars/get-initials.md | 14 + .../client-web/examples/avatars/get-q-r.md | 14 + .../examples/databases/create-document.md | 18 + .../examples/databases/delete-document.md | 18 + .../examples/databases/get-document.md | 18 + .../examples/databases/list-documents.md | 18 + .../examples/databases/update-document.md | 18 + .../examples/functions/create-execution.md | 18 + .../examples/functions/get-execution.md | 18 + .../examples/functions/list-executions.md | 18 + .../client-web/examples/graphql/mutation.md | 18 + .../client-web/examples/graphql/query.md | 18 + .../1.4.x/client-web/examples/locale/get.md | 18 + .../client-web/examples/locale/list-codes.md | 18 + .../examples/locale/list-continents.md | 18 + .../examples/locale/list-countries-e-u.md | 18 + .../examples/locale/list-countries-phones.md | 18 + .../examples/locale/list-countries.md | 18 + .../examples/locale/list-currencies.md | 18 + .../examples/locale/list-languages.md | 18 + .../examples/storage/create-file.md | 18 + .../examples/storage/delete-file.md | 18 + .../examples/storage/get-file-download.md | 14 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 14 + .../client-web/examples/storage/get-file.md | 18 + .../client-web/examples/storage/list-files.md | 18 + .../examples/storage/update-file.md | 18 + .../examples/teams/create-membership.md | 18 + .../1.4.x/client-web/examples/teams/create.md | 18 + .../examples/teams/delete-membership.md | 18 + .../1.4.x/client-web/examples/teams/delete.md | 18 + .../examples/teams/get-membership.md | 18 + .../client-web/examples/teams/get-prefs.md | 18 + .../1.4.x/client-web/examples/teams/get.md | 18 + .../examples/teams/list-memberships.md | 18 + .../1.4.x/client-web/examples/teams/list.md | 18 + .../teams/update-membership-status.md | 18 + .../examples/teams/update-membership.md | 18 + .../client-web/examples/teams/update-name.md | 18 + .../client-web/examples/teams/update-prefs.md | 18 + .../account/create-anonymous-session.md | 1 + .../examples/account/create-email-session.md | 3 + .../examples/account/create-j-w-t.md | 1 + .../account/create-magic-u-r-l-session.md | 4 + .../examples/account/create-o-auth2session.md | 5 + .../examples/account/create-phone-session.md | 3 + .../account/create-phone-verification.md | 1 + .../examples/account/create-recovery.md | 3 + .../examples/account/create-verification.md | 2 + .../console-cli/examples/account/create.md | 5 + .../examples/account/delete-identity.md | 2 + .../examples/account/delete-session.md | 2 + .../examples/account/delete-sessions.md | 1 + .../console-cli/examples/account/get-prefs.md | 1 + .../examples/account/get-session.md | 2 + .../1.4.x/console-cli/examples/account/get.md | 1 + .../examples/account/list-identities.md | 2 + .../console-cli/examples/account/list-logs.md | 2 + .../examples/account/list-sessions.md | 1 + .../examples/account/update-email.md | 3 + .../account/update-magic-u-r-l-session.md | 3 + .../examples/account/update-name.md | 2 + .../examples/account/update-password.md | 3 + .../examples/account/update-phone-session.md | 3 + .../account/update-phone-verification.md | 3 + .../examples/account/update-phone.md | 3 + .../examples/account/update-prefs.md | 2 + .../examples/account/update-recovery.md | 5 + .../examples/account/update-session.md | 2 + .../examples/account/update-status.md | 1 + .../examples/account/update-verification.md | 3 + .../console-cli/examples/assistant/chat.md | 2 + .../examples/avatars/get-browser.md | 5 + .../examples/avatars/get-credit-card.md | 5 + .../examples/avatars/get-favicon.md | 2 + .../console-cli/examples/avatars/get-flag.md | 5 + .../console-cli/examples/avatars/get-image.md | 4 + .../examples/avatars/get-initials.md | 5 + .../console-cli/examples/avatars/get-q-r.md | 5 + .../console-cli/examples/console/variables.md | 1 + .../databases/create-boolean-attribute.md | 7 + .../examples/databases/create-collection.md | 7 + .../databases/create-datetime-attribute.md | 7 + .../examples/databases/create-document.md | 6 + .../databases/create-email-attribute.md | 7 + .../databases/create-enum-attribute.md | 8 + .../databases/create-float-attribute.md | 9 + .../examples/databases/create-index.md | 7 + .../databases/create-integer-attribute.md | 9 + .../examples/databases/create-ip-attribute.md | 7 + .../create-relationship-attribute.md | 9 + .../databases/create-string-attribute.md | 9 + .../databases/create-url-attribute.md | 7 + .../console-cli/examples/databases/create.md | 4 + .../examples/databases/delete-attribute.md | 4 + .../examples/databases/delete-collection.md | 3 + .../examples/databases/delete-document.md | 4 + .../examples/databases/delete-index.md | 4 + .../console-cli/examples/databases/delete.md | 2 + .../examples/databases/get-attribute.md | 4 + .../databases/get-collection-usage.md | 4 + .../examples/databases/get-collection.md | 3 + .../examples/databases/get-database-usage.md | 3 + .../examples/databases/get-document.md | 5 + .../examples/databases/get-index.md | 4 + .../examples/databases/get-usage.md | 2 + .../console-cli/examples/databases/get.md | 2 + .../examples/databases/list-attributes.md | 4 + .../databases/list-collection-logs.md | 4 + .../examples/databases/list-collections.md | 4 + .../examples/databases/list-document-logs.md | 5 + .../examples/databases/list-documents.md | 4 + .../examples/databases/list-indexes.md | 4 + .../examples/databases/list-logs.md | 3 + .../console-cli/examples/databases/list.md | 3 + .../databases/update-boolean-attribute.md | 6 + .../examples/databases/update-collection.md | 7 + .../databases/update-datetime-attribute.md | 6 + .../examples/databases/update-document.md | 6 + .../databases/update-email-attribute.md | 6 + .../databases/update-enum-attribute.md | 7 + .../databases/update-float-attribute.md | 8 + .../databases/update-integer-attribute.md | 8 + .../examples/databases/update-ip-attribute.md | 6 + .../update-relationship-attribute.md | 5 + .../databases/update-string-attribute.md | 6 + .../databases/update-url-attribute.md | 6 + .../console-cli/examples/databases/update.md | 4 + .../examples/functions/create-build.md | 4 + .../examples/functions/create-deployment.md | 6 + .../examples/functions/create-execution.md | 7 + .../examples/functions/create-variable.md | 4 + .../console-cli/examples/functions/create.md | 21 + .../examples/functions/delete-deployment.md | 3 + .../examples/functions/delete-variable.md | 3 + .../console-cli/examples/functions/delete.md | 2 + .../examples/functions/download-deployment.md | 3 + .../examples/functions/get-deployment.md | 3 + .../examples/functions/get-execution.md | 3 + .../examples/functions/get-function-usage.md | 3 + .../examples/functions/get-usage.md | 2 + .../examples/functions/get-variable.md | 3 + .../console-cli/examples/functions/get.md | 2 + .../examples/functions/list-deployments.md | 4 + .../examples/functions/list-executions.md | 4 + .../examples/functions/list-runtimes.md | 1 + .../examples/functions/list-variables.md | 2 + .../console-cli/examples/functions/list.md | 3 + .../examples/functions/update-deployment.md | 3 + .../examples/functions/update-variable.md | 5 + .../console-cli/examples/functions/update.md | 17 + .../console-cli/examples/graphql/mutation.md | 2 + .../console-cli/examples/graphql/query.md | 2 + .../examples/health/get-antivirus.md | 1 + .../console-cli/examples/health/get-cache.md | 1 + .../console-cli/examples/health/get-d-b.md | 1 + .../examples/health/get-pub-sub.md | 1 + .../examples/health/get-queue-certificates.md | 1 + .../examples/health/get-queue-functions.md | 1 + .../examples/health/get-queue-logs.md | 1 + .../examples/health/get-queue-webhooks.md | 1 + .../console-cli/examples/health/get-queue.md | 1 + .../examples/health/get-storage-local.md | 1 + .../console-cli/examples/health/get-time.md | 1 + .../1.4.x/console-cli/examples/health/get.md | 1 + .../1.4.x/console-cli/examples/locale/get.md | 1 + .../console-cli/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 + .../migrations/create-appwrite-migration.md | 5 + .../migrations/create-firebase-migration.md | 3 + .../create-firebase-o-auth-migration.md | 3 + .../migrations/create-n-host-migration.md | 9 + .../migrations/create-supabase-migration.md | 8 + .../migrations/delete-firebase-auth.md | 1 + .../console-cli/examples/migrations/delete.md | 2 + .../migrations/get-appwrite-report.md | 5 + .../migrations/get-firebase-report-o-auth.md | 3 + .../migrations/get-firebase-report.md | 3 + .../examples/migrations/get-n-host-report.md | 9 + .../migrations/get-supabase-report.md | 8 + .../console-cli/examples/migrations/get.md | 2 + .../migrations/list-firebase-projects.md | 1 + .../console-cli/examples/migrations/list.md | 3 + .../console-cli/examples/migrations/retry.md | 2 + .../examples/project/create-variable.md | 3 + .../examples/project/delete-variable.md | 2 + .../console-cli/examples/project/get-usage.md | 2 + .../examples/project/get-variable.md | 2 + .../examples/project/list-variables.md | 1 + .../examples/project/update-variable.md | 4 + .../examples/projects/create-key.md | 5 + .../examples/projects/create-platform.md | 7 + .../examples/projects/create-webhook.md | 8 + .../console-cli/examples/projects/create.md | 14 + .../projects/delete-email-template.md | 4 + .../examples/projects/delete-key.md | 3 + .../examples/projects/delete-platform.md | 3 + .../examples/projects/delete-sms-template.md | 4 + .../examples/projects/delete-webhook.md | 3 + .../console-cli/examples/projects/delete.md | 2 + .../examples/projects/get-email-template.md | 4 + .../console-cli/examples/projects/get-key.md | 3 + .../examples/projects/get-platform.md | 3 + .../examples/projects/get-sms-template.md | 4 + .../examples/projects/get-usage.md | 3 + .../examples/projects/get-webhook.md | 3 + .../console-cli/examples/projects/get.md | 2 + .../examples/projects/list-keys.md | 2 + .../examples/projects/list-platforms.md | 2 + .../examples/projects/list-webhooks.md | 2 + .../console-cli/examples/projects/list.md | 3 + .../examples/projects/update-auth-duration.md | 3 + .../examples/projects/update-auth-limit.md | 3 + .../update-auth-password-dictionary.md | 3 + .../projects/update-auth-password-history.md | 3 + .../projects/update-auth-sessions-limit.md | 3 + .../examples/projects/update-auth-status.md | 4 + .../projects/update-email-template.md | 9 + .../examples/projects/update-key.md | 6 + .../examples/projects/update-o-auth2.md | 6 + .../projects/update-personal-data-check.md | 3 + .../examples/projects/update-platform.md | 7 + .../projects/update-service-status-all.md | 3 + .../projects/update-service-status.md | 4 + .../examples/projects/update-sms-template.md | 5 + .../projects/update-smtp-configuration.md | 11 + .../examples/projects/update-team.md | 3 + .../projects/update-webhook-signature.md | 3 + .../examples/projects/update-webhook.md | 9 + .../console-cli/examples/projects/update.md | 12 + .../console-cli/examples/proxy/create-rule.md | 4 + .../console-cli/examples/proxy/delete-rule.md | 2 + .../console-cli/examples/proxy/get-rule.md | 2 + .../console-cli/examples/proxy/list-rules.md | 3 + .../proxy/update-rule-verification.md | 2 + .../examples/storage/create-bucket.md | 11 + .../examples/storage/create-file.md | 5 + .../examples/storage/delete-bucket.md | 2 + .../examples/storage/delete-file.md | 3 + .../examples/storage/get-bucket-usage.md | 3 + .../examples/storage/get-bucket.md | 2 + .../examples/storage/get-file-download.md | 3 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 3 + .../console-cli/examples/storage/get-file.md | 3 + .../console-cli/examples/storage/get-usage.md | 2 + .../examples/storage/list-buckets.md | 3 + .../examples/storage/list-files.md | 4 + .../examples/storage/update-bucket.md | 11 + .../examples/storage/update-file.md | 5 + .../examples/teams/create-membership.md | 8 + .../console-cli/examples/teams/create.md | 4 + .../examples/teams/delete-membership.md | 3 + .../console-cli/examples/teams/delete.md | 2 + .../examples/teams/get-membership.md | 3 + .../console-cli/examples/teams/get-prefs.md | 2 + .../1.4.x/console-cli/examples/teams/get.md | 2 + .../console-cli/examples/teams/list-logs.md | 3 + .../examples/teams/list-memberships.md | 4 + .../1.4.x/console-cli/examples/teams/list.md | 3 + .../teams/update-membership-status.md | 5 + .../examples/teams/update-membership.md | 4 + .../console-cli/examples/teams/update-name.md | 3 + .../examples/teams/update-prefs.md | 3 + .../examples/users/create-argon2user.md | 5 + .../examples/users/create-bcrypt-user.md | 5 + .../examples/users/create-m-d5user.md | 5 + .../examples/users/create-p-h-pass-user.md | 5 + .../examples/users/create-s-h-a-user.md | 6 + .../users/create-scrypt-modified-user.md | 8 + .../examples/users/create-scrypt-user.md | 10 + .../console-cli/examples/users/create.md | 6 + .../examples/users/delete-identity.md | 2 + .../examples/users/delete-session.md | 3 + .../examples/users/delete-sessions.md | 2 + .../console-cli/examples/users/delete.md | 2 + .../console-cli/examples/users/get-prefs.md | 2 + .../console-cli/examples/users/get-usage.md | 3 + .../1.4.x/console-cli/examples/users/get.md | 2 + .../examples/users/list-identities.md | 3 + .../console-cli/examples/users/list-logs.md | 3 + .../examples/users/list-memberships.md | 2 + .../examples/users/list-sessions.md | 2 + .../1.4.x/console-cli/examples/users/list.md | 3 + .../users/update-email-verification.md | 3 + .../examples/users/update-email.md | 3 + .../examples/users/update-labels.md | 3 + .../console-cli/examples/users/update-name.md | 3 + .../examples/users/update-password.md | 3 + .../users/update-phone-verification.md | 3 + .../examples/users/update-phone.md | 3 + .../examples/users/update-prefs.md | 3 + .../examples/users/update-status.md | 3 + .../vcs/create-repository-detection.md | 4 + .../examples/vcs/create-repository.md | 4 + .../examples/vcs/delete-installation.md | 2 + .../examples/vcs/get-installation.md | 2 + .../examples/vcs/get-repository.md | 3 + .../examples/vcs/list-installations.md | 3 + .../examples/vcs/list-repositories.md | 3 + .../examples/vcs/list-repository-branches.md | 3 + .../vcs/update-external-deployments.md | 4 + .../account/create-anonymous-session.md | 18 + .../examples/account/create-email-session.md | 18 + .../examples/account/create-j-w-t.md | 18 + .../account/create-magic-u-r-l-session.md | 18 + .../examples/account/create-o-auth2session.md | 14 + .../examples/account/create-phone-session.md | 18 + .../account/create-phone-verification.md | 18 + .../examples/account/create-recovery.md | 18 + .../examples/account/create-verification.md | 18 + .../console-web/examples/account/create.md | 18 + .../examples/account/delete-identity.md | 18 + .../examples/account/delete-session.md | 18 + .../examples/account/delete-sessions.md | 18 + .../console-web/examples/account/get-prefs.md | 18 + .../examples/account/get-session.md | 18 + .../1.4.x/console-web/examples/account/get.md | 18 + .../examples/account/list-identities.md | 18 + .../console-web/examples/account/list-logs.md | 18 + .../examples/account/list-sessions.md | 18 + .../examples/account/update-email.md | 18 + .../account/update-magic-u-r-l-session.md | 18 + .../examples/account/update-name.md | 18 + .../examples/account/update-password.md | 18 + .../examples/account/update-phone-session.md | 18 + .../account/update-phone-verification.md | 18 + .../examples/account/update-phone.md | 18 + .../examples/account/update-prefs.md | 18 + .../examples/account/update-recovery.md | 18 + .../examples/account/update-session.md | 18 + .../examples/account/update-status.md | 18 + .../examples/account/update-verification.md | 18 + .../console-web/examples/assistant/chat.md | 17 + .../examples/avatars/get-browser.md | 14 + .../examples/avatars/get-credit-card.md | 14 + .../examples/avatars/get-favicon.md | 14 + .../console-web/examples/avatars/get-flag.md | 14 + .../console-web/examples/avatars/get-image.md | 14 + .../examples/avatars/get-initials.md | 14 + .../console-web/examples/avatars/get-q-r.md | 14 + .../console-web/examples/console/variables.md | 18 + .../databases/create-boolean-attribute.md | 18 + .../examples/databases/create-collection.md | 18 + .../databases/create-datetime-attribute.md | 18 + .../examples/databases/create-document.md | 18 + .../databases/create-email-attribute.md | 18 + .../databases/create-enum-attribute.md | 18 + .../databases/create-float-attribute.md | 18 + .../examples/databases/create-index.md | 18 + .../databases/create-integer-attribute.md | 18 + .../examples/databases/create-ip-attribute.md | 18 + .../create-relationship-attribute.md | 18 + .../databases/create-string-attribute.md | 18 + .../databases/create-url-attribute.md | 18 + .../console-web/examples/databases/create.md | 18 + .../examples/databases/delete-attribute.md | 18 + .../examples/databases/delete-collection.md | 18 + .../examples/databases/delete-document.md | 18 + .../examples/databases/delete-index.md | 18 + .../console-web/examples/databases/delete.md | 18 + .../examples/databases/get-attribute.md | 18 + .../databases/get-collection-usage.md | 18 + .../examples/databases/get-collection.md | 18 + .../examples/databases/get-database-usage.md | 18 + .../examples/databases/get-document.md | 18 + .../examples/databases/get-index.md | 18 + .../examples/databases/get-usage.md | 18 + .../console-web/examples/databases/get.md | 18 + .../examples/databases/list-attributes.md | 18 + .../databases/list-collection-logs.md | 18 + .../examples/databases/list-collections.md | 18 + .../examples/databases/list-document-logs.md | 18 + .../examples/databases/list-documents.md | 18 + .../examples/databases/list-indexes.md | 18 + .../examples/databases/list-logs.md | 18 + .../console-web/examples/databases/list.md | 18 + .../databases/update-boolean-attribute.md | 18 + .../examples/databases/update-collection.md | 18 + .../databases/update-datetime-attribute.md | 18 + .../examples/databases/update-document.md | 18 + .../databases/update-email-attribute.md | 18 + .../databases/update-enum-attribute.md | 18 + .../databases/update-float-attribute.md | 18 + .../databases/update-integer-attribute.md | 18 + .../examples/databases/update-ip-attribute.md | 18 + .../update-relationship-attribute.md | 18 + .../databases/update-string-attribute.md | 18 + .../databases/update-url-attribute.md | 18 + .../console-web/examples/databases/update.md | 18 + .../examples/functions/create-build.md | 18 + .../examples/functions/create-deployment.md | 18 + .../examples/functions/create-execution.md | 18 + .../examples/functions/create-variable.md | 18 + .../console-web/examples/functions/create.md | 18 + .../examples/functions/delete-deployment.md | 18 + .../examples/functions/delete-variable.md | 18 + .../console-web/examples/functions/delete.md | 18 + .../examples/functions/download-deployment.md | 14 + .../examples/functions/get-deployment.md | 18 + .../examples/functions/get-execution.md | 18 + .../examples/functions/get-function-usage.md | 18 + .../examples/functions/get-usage.md | 18 + .../examples/functions/get-variable.md | 18 + .../console-web/examples/functions/get.md | 18 + .../examples/functions/list-deployments.md | 18 + .../examples/functions/list-executions.md | 18 + .../examples/functions/list-runtimes.md | 18 + .../examples/functions/list-variables.md | 18 + .../console-web/examples/functions/list.md | 18 + .../examples/functions/update-deployment.md | 18 + .../examples/functions/update-variable.md | 18 + .../console-web/examples/functions/update.md | 18 + .../console-web/examples/graphql/mutation.md | 18 + .../console-web/examples/graphql/query.md | 18 + .../examples/health/get-antivirus.md | 18 + .../console-web/examples/health/get-cache.md | 18 + .../console-web/examples/health/get-d-b.md | 18 + .../examples/health/get-pub-sub.md | 18 + .../examples/health/get-queue-certificates.md | 18 + .../examples/health/get-queue-functions.md | 18 + .../examples/health/get-queue-logs.md | 18 + .../examples/health/get-queue-webhooks.md | 18 + .../console-web/examples/health/get-queue.md | 18 + .../examples/health/get-storage-local.md | 18 + .../console-web/examples/health/get-time.md | 18 + .../1.4.x/console-web/examples/health/get.md | 18 + .../1.4.x/console-web/examples/locale/get.md | 18 + .../console-web/examples/locale/list-codes.md | 18 + .../examples/locale/list-continents.md | 18 + .../examples/locale/list-countries-e-u.md | 18 + .../examples/locale/list-countries-phones.md | 18 + .../examples/locale/list-countries.md | 18 + .../examples/locale/list-currencies.md | 18 + .../examples/locale/list-languages.md | 18 + .../migrations/create-appwrite-migration.md | 18 + .../migrations/create-firebase-migration.md | 18 + .../create-firebase-o-auth-migration.md | 18 + .../migrations/create-n-host-migration.md | 18 + .../migrations/create-supabase-migration.md | 18 + .../migrations/delete-firebase-auth.md | 17 + .../console-web/examples/migrations/delete.md | 18 + .../migrations/get-appwrite-report.md | 18 + .../migrations/get-firebase-report-o-auth.md | 18 + .../migrations/get-firebase-report.md | 18 + .../examples/migrations/get-n-host-report.md | 18 + .../migrations/get-supabase-report.md | 18 + .../console-web/examples/migrations/get.md | 18 + .../migrations/list-firebase-projects.md | 17 + .../console-web/examples/migrations/list.md | 18 + .../console-web/examples/migrations/retry.md | 18 + .../examples/project/create-variable.md | 18 + .../examples/project/delete-variable.md | 18 + .../console-web/examples/project/get-usage.md | 18 + .../examples/project/get-variable.md | 18 + .../examples/project/list-variables.md | 18 + .../examples/project/update-variable.md | 18 + .../examples/projects/create-key.md | 18 + .../examples/projects/create-platform.md | 18 + .../examples/projects/create-webhook.md | 18 + .../console-web/examples/projects/create.md | 18 + .../projects/delete-email-template.md | 18 + .../examples/projects/delete-key.md | 18 + .../examples/projects/delete-platform.md | 18 + .../examples/projects/delete-sms-template.md | 18 + .../examples/projects/delete-webhook.md | 18 + .../console-web/examples/projects/delete.md | 18 + .../examples/projects/get-email-template.md | 18 + .../console-web/examples/projects/get-key.md | 18 + .../examples/projects/get-platform.md | 18 + .../examples/projects/get-sms-template.md | 18 + .../examples/projects/get-usage.md | 18 + .../examples/projects/get-webhook.md | 18 + .../console-web/examples/projects/get.md | 18 + .../examples/projects/list-keys.md | 18 + .../examples/projects/list-platforms.md | 18 + .../examples/projects/list-webhooks.md | 18 + .../console-web/examples/projects/list.md | 18 + .../examples/projects/update-auth-duration.md | 18 + .../examples/projects/update-auth-limit.md | 18 + .../update-auth-password-dictionary.md | 18 + .../projects/update-auth-password-history.md | 18 + .../projects/update-auth-sessions-limit.md | 18 + .../examples/projects/update-auth-status.md | 18 + .../projects/update-email-template.md | 18 + .../examples/projects/update-key.md | 18 + .../examples/projects/update-o-auth2.md | 18 + .../projects/update-personal-data-check.md | 18 + .../examples/projects/update-platform.md | 18 + .../projects/update-service-status-all.md | 18 + .../projects/update-service-status.md | 18 + .../examples/projects/update-sms-template.md | 18 + .../projects/update-smtp-configuration.md | 18 + .../examples/projects/update-team.md | 18 + .../projects/update-webhook-signature.md | 18 + .../examples/projects/update-webhook.md | 18 + .../console-web/examples/projects/update.md | 18 + .../console-web/examples/proxy/create-rule.md | 18 + .../console-web/examples/proxy/delete-rule.md | 18 + .../console-web/examples/proxy/get-rule.md | 18 + .../console-web/examples/proxy/list-rules.md | 18 + .../proxy/update-rule-verification.md | 18 + .../examples/storage/create-bucket.md | 18 + .../examples/storage/create-file.md | 18 + .../examples/storage/delete-bucket.md | 18 + .../examples/storage/delete-file.md | 18 + .../examples/storage/get-bucket-usage.md | 18 + .../examples/storage/get-bucket.md | 18 + .../examples/storage/get-file-download.md | 14 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 14 + .../console-web/examples/storage/get-file.md | 18 + .../console-web/examples/storage/get-usage.md | 18 + .../examples/storage/list-buckets.md | 18 + .../examples/storage/list-files.md | 18 + .../examples/storage/update-bucket.md | 18 + .../examples/storage/update-file.md | 18 + .../examples/teams/create-membership.md | 18 + .../console-web/examples/teams/create.md | 18 + .../examples/teams/delete-membership.md | 18 + .../console-web/examples/teams/delete.md | 18 + .../examples/teams/get-membership.md | 18 + .../console-web/examples/teams/get-prefs.md | 18 + .../1.4.x/console-web/examples/teams/get.md | 18 + .../console-web/examples/teams/list-logs.md | 18 + .../examples/teams/list-memberships.md | 18 + .../1.4.x/console-web/examples/teams/list.md | 18 + .../teams/update-membership-status.md | 18 + .../examples/teams/update-membership.md | 18 + .../console-web/examples/teams/update-name.md | 18 + .../examples/teams/update-prefs.md | 18 + .../examples/users/create-argon2user.md | 18 + .../examples/users/create-bcrypt-user.md | 18 + .../examples/users/create-m-d5user.md | 18 + .../examples/users/create-p-h-pass-user.md | 18 + .../examples/users/create-s-h-a-user.md | 18 + .../users/create-scrypt-modified-user.md | 18 + .../examples/users/create-scrypt-user.md | 18 + .../console-web/examples/users/create.md | 18 + .../examples/users/delete-identity.md | 18 + .../examples/users/delete-session.md | 18 + .../examples/users/delete-sessions.md | 18 + .../console-web/examples/users/delete.md | 18 + .../console-web/examples/users/get-prefs.md | 18 + .../console-web/examples/users/get-usage.md | 18 + .../1.4.x/console-web/examples/users/get.md | 18 + .../examples/users/list-identities.md | 18 + .../console-web/examples/users/list-logs.md | 18 + .../examples/users/list-memberships.md | 18 + .../examples/users/list-sessions.md | 18 + .../1.4.x/console-web/examples/users/list.md | 18 + .../users/update-email-verification.md | 18 + .../examples/users/update-email.md | 18 + .../examples/users/update-labels.md | 18 + .../console-web/examples/users/update-name.md | 18 + .../examples/users/update-password.md | 18 + .../users/update-phone-verification.md | 18 + .../examples/users/update-phone.md | 18 + .../examples/users/update-prefs.md | 18 + .../examples/users/update-status.md | 18 + .../vcs/create-repository-detection.md | 17 + .../examples/vcs/create-repository.md | 17 + .../examples/vcs/delete-installation.md | 17 + .../examples/vcs/get-installation.md | 17 + .../examples/vcs/get-repository.md | 17 + .../examples/vcs/list-installations.md | 17 + .../examples/vcs/list-repositories.md | 17 + .../examples/vcs/list-repository-branches.md | 17 + .../vcs/update-external-deployments.md | 17 + .../account/create-phone-verification.md | 21 + .../examples/account/create-recovery.md | 24 + .../examples/account/create-verification.md | 23 + .../examples/account/delete-identity.md | 23 + .../examples/account/delete-session.md | 23 + .../examples/account/delete-sessions.md | 21 + .../server-dart/examples/account/get-prefs.md | 21 + .../examples/account/get-session.md | 23 + .../1.4.x/server-dart/examples/account/get.md | 21 + .../examples/account/list-identities.md | 22 + .../server-dart/examples/account/list-logs.md | 22 + .../examples/account/list-sessions.md | 21 + .../examples/account/update-email.md | 24 + .../examples/account/update-name.md | 23 + .../examples/account/update-password.md | 23 + .../account/update-phone-verification.md | 24 + .../examples/account/update-phone.md | 24 + .../examples/account/update-prefs.md | 23 + .../examples/account/update-recovery.md | 26 + .../examples/account/update-session.md | 23 + .../examples/account/update-status.md | 21 + .../examples/account/update-verification.md | 24 + .../examples/avatars/get-browser.md | 23 + .../examples/avatars/get-credit-card.md | 23 + .../examples/avatars/get-favicon.md | 23 + .../server-dart/examples/avatars/get-flag.md | 23 + .../server-dart/examples/avatars/get-image.md | 23 + .../examples/avatars/get-initials.md | 22 + .../server-dart/examples/avatars/get-q-r.md | 23 + .../databases/create-boolean-attribute.md | 26 + .../examples/databases/create-collection.md | 25 + .../databases/create-datetime-attribute.md | 26 + .../examples/databases/create-document.md | 26 + .../databases/create-email-attribute.md | 26 + .../databases/create-enum-attribute.md | 27 + .../databases/create-float-attribute.md | 26 + .../examples/databases/create-index.md | 27 + .../databases/create-integer-attribute.md | 26 + .../examples/databases/create-ip-attribute.md | 26 + .../create-relationship-attribute.md | 26 + .../databases/create-string-attribute.md | 27 + .../databases/create-url-attribute.md | 26 + .../server-dart/examples/databases/create.md | 24 + .../examples/databases/delete-attribute.md | 25 + .../examples/databases/delete-collection.md | 24 + .../examples/databases/delete-document.md | 25 + .../examples/databases/delete-index.md | 25 + .../server-dart/examples/databases/delete.md | 23 + .../examples/databases/get-attribute.md | 25 + .../examples/databases/get-collection.md | 24 + .../examples/databases/get-document.md | 25 + .../examples/databases/get-index.md | 25 + .../server-dart/examples/databases/get.md | 23 + .../examples/databases/list-attributes.md | 24 + .../examples/databases/list-collections.md | 23 + .../examples/databases/list-documents.md | 24 + .../examples/databases/list-indexes.md | 24 + .../server-dart/examples/databases/list.md | 22 + .../databases/update-boolean-attribute.md | 27 + .../examples/databases/update-collection.md | 25 + .../databases/update-datetime-attribute.md | 27 + .../examples/databases/update-document.md | 25 + .../databases/update-email-attribute.md | 27 + .../databases/update-enum-attribute.md | 28 + .../databases/update-float-attribute.md | 29 + .../databases/update-integer-attribute.md | 29 + .../examples/databases/update-ip-attribute.md | 27 + .../update-relationship-attribute.md | 25 + .../databases/update-string-attribute.md | 27 + .../databases/update-url-attribute.md | 27 + .../server-dart/examples/databases/update.md | 24 + .../examples/functions/create-build.md | 25 + .../examples/functions/create-deployment.md | 25 + .../examples/functions/create-execution.md | 23 + .../examples/functions/create-variable.md | 25 + .../server-dart/examples/functions/create.md | 25 + .../examples/functions/delete-deployment.md | 24 + .../examples/functions/delete-variable.md | 24 + .../server-dart/examples/functions/delete.md | 23 + .../examples/functions/download-deployment.md | 24 + .../examples/functions/get-deployment.md | 24 + .../examples/functions/get-execution.md | 24 + .../examples/functions/get-variable.md | 24 + .../server-dart/examples/functions/get.md | 23 + .../examples/functions/list-deployments.md | 23 + .../examples/functions/list-executions.md | 23 + .../examples/functions/list-runtimes.md | 21 + .../examples/functions/list-variables.md | 23 + .../server-dart/examples/functions/list.md | 22 + .../examples/functions/update-deployment.md | 24 + .../examples/functions/update-variable.md | 25 + .../server-dart/examples/functions/update.md | 25 + .../server-dart/examples/graphql/mutation.md | 23 + .../server-dart/examples/graphql/query.md | 23 + .../examples/health/get-antivirus.md | 21 + .../server-dart/examples/health/get-cache.md | 21 + .../server-dart/examples/health/get-d-b.md | 21 + .../examples/health/get-pub-sub.md | 21 + .../examples/health/get-queue-certificates.md | 21 + .../examples/health/get-queue-functions.md | 21 + .../examples/health/get-queue-logs.md | 21 + .../examples/health/get-queue-webhooks.md | 21 + .../server-dart/examples/health/get-queue.md | 21 + .../examples/health/get-storage-local.md | 21 + .../server-dart/examples/health/get-time.md | 21 + .../1.4.x/server-dart/examples/health/get.md | 21 + .../1.4.x/server-dart/examples/locale/get.md | 21 + .../server-dart/examples/locale/list-codes.md | 21 + .../examples/locale/list-continents.md | 21 + .../examples/locale/list-countries-e-u.md | 21 + .../examples/locale/list-countries-phones.md | 21 + .../examples/locale/list-countries.md | 21 + .../examples/locale/list-currencies.md | 21 + .../examples/locale/list-languages.md | 21 + .../examples/storage/create-bucket.md | 24 + .../examples/storage/create-file.md | 26 + .../examples/storage/delete-bucket.md | 23 + .../examples/storage/delete-file.md | 24 + .../examples/storage/get-bucket.md | 23 + .../examples/storage/get-file-download.md | 24 + .../examples/storage/get-file-preview.md | 24 + .../examples/storage/get-file-view.md | 24 + .../server-dart/examples/storage/get-file.md | 24 + .../examples/storage/list-buckets.md | 22 + .../examples/storage/list-files.md | 23 + .../examples/storage/update-bucket.md | 24 + .../examples/storage/update-file.md | 24 + .../examples/teams/create-membership.md | 25 + .../server-dart/examples/teams/create.md | 24 + .../examples/teams/delete-membership.md | 24 + .../server-dart/examples/teams/delete.md | 23 + .../examples/teams/get-membership.md | 24 + .../server-dart/examples/teams/get-prefs.md | 23 + .../1.4.x/server-dart/examples/teams/get.md | 23 + .../examples/teams/list-memberships.md | 23 + .../1.4.x/server-dart/examples/teams/list.md | 22 + .../teams/update-membership-status.md | 26 + .../examples/teams/update-membership.md | 25 + .../server-dart/examples/teams/update-name.md | 24 + .../examples/teams/update-prefs.md | 24 + .../examples/users/create-argon2user.md | 25 + .../examples/users/create-bcrypt-user.md | 25 + .../examples/users/create-m-d5user.md | 25 + .../examples/users/create-p-h-pass-user.md | 25 + .../examples/users/create-s-h-a-user.md | 25 + .../users/create-scrypt-modified-user.md | 28 + .../examples/users/create-scrypt-user.md | 30 + .../server-dart/examples/users/create.md | 23 + .../examples/users/delete-identity.md | 23 + .../examples/users/delete-session.md | 24 + .../examples/users/delete-sessions.md | 23 + .../server-dart/examples/users/delete.md | 23 + .../server-dart/examples/users/get-prefs.md | 23 + .../1.4.x/server-dart/examples/users/get.md | 23 + .../examples/users/list-identities.md | 22 + .../server-dart/examples/users/list-logs.md | 23 + .../examples/users/list-memberships.md | 23 + .../examples/users/list-sessions.md | 23 + .../1.4.x/server-dart/examples/users/list.md | 22 + .../users/update-email-verification.md | 24 + .../examples/users/update-email.md | 24 + .../examples/users/update-labels.md | 24 + .../server-dart/examples/users/update-name.md | 24 + .../examples/users/update-password.md | 24 + .../users/update-phone-verification.md | 24 + .../examples/users/update-phone.md | 24 + .../examples/users/update-prefs.md | 24 + .../examples/users/update-status.md | 24 + .../account/create-phone-verification.md | 21 + .../examples/account/create-recovery.md | 21 + .../examples/account/create-verification.md | 21 + .../examples/account/delete-identity.md | 21 + .../examples/account/delete-session.md | 21 + .../examples/account/delete-sessions.md | 21 + .../server-deno/examples/account/get-prefs.md | 21 + .../examples/account/get-session.md | 21 + .../1.4.x/server-deno/examples/account/get.md | 21 + .../examples/account/list-identities.md | 21 + .../server-deno/examples/account/list-logs.md | 21 + .../examples/account/list-sessions.md | 21 + .../examples/account/update-email.md | 21 + .../examples/account/update-name.md | 21 + .../examples/account/update-password.md | 21 + .../account/update-phone-verification.md | 21 + .../examples/account/update-phone.md | 21 + .../examples/account/update-prefs.md | 21 + .../examples/account/update-recovery.md | 21 + .../examples/account/update-session.md | 21 + .../examples/account/update-status.md | 21 + .../examples/account/update-verification.md | 21 + .../examples/avatars/get-browser.md | 21 + .../examples/avatars/get-credit-card.md | 21 + .../examples/avatars/get-favicon.md | 21 + .../server-deno/examples/avatars/get-flag.md | 21 + .../server-deno/examples/avatars/get-image.md | 21 + .../examples/avatars/get-initials.md | 21 + .../server-deno/examples/avatars/get-q-r.md | 21 + .../databases/create-boolean-attribute.md | 21 + .../examples/databases/create-collection.md | 21 + .../databases/create-datetime-attribute.md | 21 + .../examples/databases/create-document.md | 21 + .../databases/create-email-attribute.md | 21 + .../databases/create-enum-attribute.md | 21 + .../databases/create-float-attribute.md | 21 + .../examples/databases/create-index.md | 21 + .../databases/create-integer-attribute.md | 21 + .../examples/databases/create-ip-attribute.md | 21 + .../create-relationship-attribute.md | 21 + .../databases/create-string-attribute.md | 21 + .../databases/create-url-attribute.md | 21 + .../server-deno/examples/databases/create.md | 21 + .../examples/databases/delete-attribute.md | 21 + .../examples/databases/delete-collection.md | 21 + .../examples/databases/delete-document.md | 21 + .../examples/databases/delete-index.md | 21 + .../server-deno/examples/databases/delete.md | 21 + .../examples/databases/get-attribute.md | 21 + .../examples/databases/get-collection.md | 21 + .../examples/databases/get-document.md | 21 + .../examples/databases/get-index.md | 21 + .../server-deno/examples/databases/get.md | 21 + .../examples/databases/list-attributes.md | 21 + .../examples/databases/list-collections.md | 21 + .../examples/databases/list-documents.md | 21 + .../examples/databases/list-indexes.md | 21 + .../server-deno/examples/databases/list.md | 21 + .../databases/update-boolean-attribute.md | 21 + .../examples/databases/update-collection.md | 21 + .../databases/update-datetime-attribute.md | 21 + .../examples/databases/update-document.md | 21 + .../databases/update-email-attribute.md | 21 + .../databases/update-enum-attribute.md | 21 + .../databases/update-float-attribute.md | 21 + .../databases/update-integer-attribute.md | 21 + .../examples/databases/update-ip-attribute.md | 21 + .../update-relationship-attribute.md | 21 + .../databases/update-string-attribute.md | 21 + .../databases/update-url-attribute.md | 21 + .../server-deno/examples/databases/update.md | 21 + .../examples/functions/create-build.md | 21 + .../examples/functions/create-deployment.md | 21 + .../examples/functions/create-execution.md | 21 + .../examples/functions/create-variable.md | 21 + .../server-deno/examples/functions/create.md | 21 + .../examples/functions/delete-deployment.md | 21 + .../examples/functions/delete-variable.md | 21 + .../server-deno/examples/functions/delete.md | 21 + .../examples/functions/download-deployment.md | 21 + .../examples/functions/get-deployment.md | 21 + .../examples/functions/get-execution.md | 21 + .../examples/functions/get-variable.md | 21 + .../server-deno/examples/functions/get.md | 21 + .../examples/functions/list-deployments.md | 21 + .../examples/functions/list-executions.md | 21 + .../examples/functions/list-runtimes.md | 21 + .../examples/functions/list-variables.md | 21 + .../server-deno/examples/functions/list.md | 21 + .../examples/functions/update-deployment.md | 21 + .../examples/functions/update-variable.md | 21 + .../server-deno/examples/functions/update.md | 21 + .../server-deno/examples/graphql/mutation.md | 21 + .../server-deno/examples/graphql/query.md | 21 + .../examples/health/get-antivirus.md | 21 + .../server-deno/examples/health/get-cache.md | 21 + .../server-deno/examples/health/get-d-b.md | 21 + .../examples/health/get-pub-sub.md | 21 + .../examples/health/get-queue-certificates.md | 21 + .../examples/health/get-queue-functions.md | 21 + .../examples/health/get-queue-logs.md | 21 + .../examples/health/get-queue-webhooks.md | 21 + .../server-deno/examples/health/get-queue.md | 21 + .../examples/health/get-storage-local.md | 21 + .../server-deno/examples/health/get-time.md | 21 + .../1.4.x/server-deno/examples/health/get.md | 21 + .../1.4.x/server-deno/examples/locale/get.md | 21 + .../server-deno/examples/locale/list-codes.md | 21 + .../examples/locale/list-continents.md | 21 + .../examples/locale/list-countries-e-u.md | 21 + .../examples/locale/list-countries-phones.md | 21 + .../examples/locale/list-countries.md | 21 + .../examples/locale/list-currencies.md | 21 + .../examples/locale/list-languages.md | 21 + .../examples/storage/create-bucket.md | 21 + .../examples/storage/create-file.md | 21 + .../examples/storage/delete-bucket.md | 21 + .../examples/storage/delete-file.md | 21 + .../examples/storage/get-bucket.md | 21 + .../examples/storage/get-file-download.md | 21 + .../examples/storage/get-file-preview.md | 21 + .../examples/storage/get-file-view.md | 21 + .../server-deno/examples/storage/get-file.md | 21 + .../examples/storage/list-buckets.md | 21 + .../examples/storage/list-files.md | 21 + .../examples/storage/update-bucket.md | 21 + .../examples/storage/update-file.md | 21 + .../examples/teams/create-membership.md | 21 + .../server-deno/examples/teams/create.md | 21 + .../examples/teams/delete-membership.md | 21 + .../server-deno/examples/teams/delete.md | 21 + .../examples/teams/get-membership.md | 21 + .../server-deno/examples/teams/get-prefs.md | 21 + .../1.4.x/server-deno/examples/teams/get.md | 21 + .../examples/teams/list-memberships.md | 21 + .../1.4.x/server-deno/examples/teams/list.md | 21 + .../teams/update-membership-status.md | 21 + .../examples/teams/update-membership.md | 21 + .../server-deno/examples/teams/update-name.md | 21 + .../examples/teams/update-prefs.md | 21 + .../examples/users/create-argon2user.md | 21 + .../examples/users/create-bcrypt-user.md | 21 + .../examples/users/create-m-d5user.md | 21 + .../examples/users/create-p-h-pass-user.md | 21 + .../examples/users/create-s-h-a-user.md | 21 + .../users/create-scrypt-modified-user.md | 21 + .../examples/users/create-scrypt-user.md | 21 + .../server-deno/examples/users/create.md | 21 + .../examples/users/delete-identity.md | 21 + .../examples/users/delete-session.md | 21 + .../examples/users/delete-sessions.md | 21 + .../server-deno/examples/users/delete.md | 21 + .../server-deno/examples/users/get-prefs.md | 21 + .../1.4.x/server-deno/examples/users/get.md | 21 + .../examples/users/list-identities.md | 21 + .../server-deno/examples/users/list-logs.md | 21 + .../examples/users/list-memberships.md | 21 + .../examples/users/list-sessions.md | 21 + .../1.4.x/server-deno/examples/users/list.md | 21 + .../users/update-email-verification.md | 21 + .../examples/users/update-email.md | 21 + .../examples/users/update-labels.md | 21 + .../server-deno/examples/users/update-name.md | 21 + .../examples/users/update-password.md | 21 + .../users/update-phone-verification.md | 21 + .../examples/users/update-phone.md | 21 + .../examples/users/update-prefs.md | 21 + .../examples/users/update-status.md | 21 + .../account/create-phone-verification.md | 12 + .../examples/account/create-recovery.md | 14 + .../examples/account/create-verification.md | 13 + .../examples/account/delete-identity.md | 13 + .../examples/account/delete-session.md | 13 + .../examples/account/delete-sessions.md | 12 + .../examples/account/get-prefs.md | 12 + .../examples/account/get-session.md | 13 + .../server-dotnet/examples/account/get.md | 12 + .../examples/account/list-identities.md | 12 + .../examples/account/list-logs.md | 12 + .../examples/account/list-sessions.md | 12 + .../examples/account/update-email.md | 14 + .../examples/account/update-name.md | 13 + .../examples/account/update-password.md | 13 + .../account/update-phone-verification.md | 14 + .../examples/account/update-phone.md | 14 + .../examples/account/update-prefs.md | 13 + .../examples/account/update-recovery.md | 16 + .../examples/account/update-session.md | 13 + .../examples/account/update-status.md | 12 + .../examples/account/update-verification.md | 14 + .../examples/avatars/get-browser.md | 13 + .../examples/avatars/get-credit-card.md | 13 + .../examples/avatars/get-favicon.md | 13 + .../examples/avatars/get-flag.md | 13 + .../examples/avatars/get-image.md | 13 + .../examples/avatars/get-initials.md | 12 + .../server-dotnet/examples/avatars/get-q-r.md | 13 + .../databases/create-boolean-attribute.md | 16 + .../examples/databases/create-collection.md | 15 + .../databases/create-datetime-attribute.md | 16 + .../examples/databases/create-document.md | 16 + .../databases/create-email-attribute.md | 16 + .../databases/create-enum-attribute.md | 17 + .../databases/create-float-attribute.md | 16 + .../examples/databases/create-index.md | 17 + .../databases/create-integer-attribute.md | 16 + .../examples/databases/create-ip-attribute.md | 16 + .../create-relationship-attribute.md | 16 + .../databases/create-string-attribute.md | 17 + .../databases/create-url-attribute.md | 16 + .../examples/databases/create.md | 14 + .../examples/databases/delete-attribute.md | 15 + .../examples/databases/delete-collection.md | 14 + .../examples/databases/delete-document.md | 15 + .../examples/databases/delete-index.md | 15 + .../examples/databases/delete.md | 13 + .../examples/databases/get-attribute.md | 15 + .../examples/databases/get-collection.md | 14 + .../examples/databases/get-document.md | 15 + .../examples/databases/get-index.md | 15 + .../server-dotnet/examples/databases/get.md | 13 + .../examples/databases/list-attributes.md | 14 + .../examples/databases/list-collections.md | 13 + .../examples/databases/list-documents.md | 14 + .../examples/databases/list-indexes.md | 14 + .../server-dotnet/examples/databases/list.md | 12 + .../databases/update-boolean-attribute.md | 17 + .../examples/databases/update-collection.md | 15 + .../databases/update-datetime-attribute.md | 17 + .../examples/databases/update-document.md | 15 + .../databases/update-email-attribute.md | 17 + .../databases/update-enum-attribute.md | 18 + .../databases/update-float-attribute.md | 19 + .../databases/update-integer-attribute.md | 19 + .../examples/databases/update-ip-attribute.md | 17 + .../update-relationship-attribute.md | 15 + .../databases/update-string-attribute.md | 17 + .../databases/update-url-attribute.md | 17 + .../examples/databases/update.md | 14 + .../examples/functions/create-build.md | 15 + .../examples/functions/create-deployment.md | 15 + .../examples/functions/create-execution.md | 13 + .../examples/functions/create-variable.md | 15 + .../examples/functions/create.md | 15 + .../examples/functions/delete-deployment.md | 14 + .../examples/functions/delete-variable.md | 14 + .../examples/functions/delete.md | 13 + .../examples/functions/download-deployment.md | 14 + .../examples/functions/get-deployment.md | 14 + .../examples/functions/get-execution.md | 14 + .../examples/functions/get-variable.md | 14 + .../server-dotnet/examples/functions/get.md | 13 + .../examples/functions/list-deployments.md | 13 + .../examples/functions/list-executions.md | 13 + .../examples/functions/list-runtimes.md | 12 + .../examples/functions/list-variables.md | 13 + .../server-dotnet/examples/functions/list.md | 12 + .../examples/functions/update-deployment.md | 14 + .../examples/functions/update-variable.md | 15 + .../examples/functions/update.md | 15 + .../examples/graphql/mutation.md | 13 + .../server-dotnet/examples/graphql/query.md | 13 + .../examples/health/get-antivirus.md | 12 + .../examples/health/get-cache.md | 12 + .../server-dotnet/examples/health/get-d-b.md | 12 + .../examples/health/get-pub-sub.md | 12 + .../examples/health/get-queue-certificates.md | 12 + .../examples/health/get-queue-functions.md | 12 + .../examples/health/get-queue-logs.md | 12 + .../examples/health/get-queue-webhooks.md | 12 + .../examples/health/get-queue.md | 12 + .../examples/health/get-storage-local.md | 12 + .../server-dotnet/examples/health/get-time.md | 12 + .../server-dotnet/examples/health/get.md | 12 + .../server-dotnet/examples/locale/get.md | 12 + .../examples/locale/list-codes.md | 12 + .../examples/locale/list-continents.md | 12 + .../examples/locale/list-countries-e-u.md | 12 + .../examples/locale/list-countries-phones.md | 12 + .../examples/locale/list-countries.md | 12 + .../examples/locale/list-currencies.md | 12 + .../examples/locale/list-languages.md | 12 + .../examples/storage/create-bucket.md | 14 + .../examples/storage/create-file.md | 15 + .../examples/storage/delete-bucket.md | 13 + .../examples/storage/delete-file.md | 14 + .../examples/storage/get-bucket.md | 13 + .../examples/storage/get-file-download.md | 14 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 14 + .../examples/storage/get-file.md | 14 + .../examples/storage/list-buckets.md | 12 + .../examples/storage/list-files.md | 13 + .../examples/storage/update-bucket.md | 14 + .../examples/storage/update-file.md | 14 + .../examples/teams/create-membership.md | 15 + .../server-dotnet/examples/teams/create.md | 14 + .../examples/teams/delete-membership.md | 14 + .../server-dotnet/examples/teams/delete.md | 13 + .../examples/teams/get-membership.md | 14 + .../server-dotnet/examples/teams/get-prefs.md | 13 + .../1.4.x/server-dotnet/examples/teams/get.md | 13 + .../examples/teams/list-memberships.md | 13 + .../server-dotnet/examples/teams/list.md | 12 + .../teams/update-membership-status.md | 16 + .../examples/teams/update-membership.md | 15 + .../examples/teams/update-name.md | 14 + .../examples/teams/update-prefs.md | 14 + .../examples/users/create-argon2user.md | 15 + .../examples/users/create-bcrypt-user.md | 15 + .../examples/users/create-m-d5user.md | 15 + .../examples/users/create-p-h-pass-user.md | 15 + .../examples/users/create-s-h-a-user.md | 15 + .../users/create-scrypt-modified-user.md | 18 + .../examples/users/create-scrypt-user.md | 20 + .../server-dotnet/examples/users/create.md | 13 + .../examples/users/delete-identity.md | 13 + .../examples/users/delete-session.md | 14 + .../examples/users/delete-sessions.md | 13 + .../server-dotnet/examples/users/delete.md | 13 + .../server-dotnet/examples/users/get-prefs.md | 13 + .../1.4.x/server-dotnet/examples/users/get.md | 13 + .../examples/users/list-identities.md | 12 + .../server-dotnet/examples/users/list-logs.md | 13 + .../examples/users/list-memberships.md | 13 + .../examples/users/list-sessions.md | 13 + .../server-dotnet/examples/users/list.md | 12 + .../users/update-email-verification.md | 14 + .../examples/users/update-email.md | 14 + .../examples/users/update-labels.md | 14 + .../examples/users/update-name.md | 14 + .../examples/users/update-password.md | 14 + .../users/update-phone-verification.md | 14 + .../examples/users/update-phone.md | 14 + .../examples/users/update-prefs.md | 14 + .../examples/users/update-status.md | 14 + .../account/create-phone-verification.md | 9 + .../examples/account/create-recovery.md | 12 + .../examples/account/create-verification.md | 11 + .../examples/account/delete-identity.md | 7 + .../examples/account/delete-session.md | 7 + .../examples/account/delete-sessions.md | 5 + .../examples/account/get-prefs.md | 5 + .../examples/account/get-session.md | 31 + .../server-graphql/examples/account/get.md | 20 + .../examples/account/list-identities.md | 17 + .../examples/account/list-logs.md | 28 + .../examples/account/list-sessions.md | 32 + .../examples/account/update-email.md | 23 + .../examples/account/update-name.md | 22 + .../examples/account/update-password.md | 22 + .../account/update-phone-verification.md | 12 + .../examples/account/update-phone.md | 23 + .../examples/account/update-prefs.md | 22 + .../examples/account/update-recovery.md | 14 + .../examples/account/update-session.md | 31 + .../examples/account/update-status.md | 20 + .../examples/account/update-verification.md | 12 + .../examples/avatars/get-browser.md | 7 + .../examples/avatars/get-credit-card.md | 7 + .../examples/avatars/get-favicon.md | 7 + .../examples/avatars/get-flag.md | 7 + .../examples/avatars/get-image.md | 7 + .../examples/avatars/get-initials.md | 5 + .../examples/avatars/get-q-r.md | 7 + .../databases/create-boolean-attribute.md | 14 + .../examples/databases/create-collection.md | 24 + .../databases/create-datetime-attribute.md | 15 + .../examples/databases/create-document.md | 16 + .../databases/create-email-attribute.md | 15 + .../databases/create-enum-attribute.md | 17 + .../databases/create-float-attribute.md | 14 + .../examples/databases/create-index.md | 15 + .../databases/create-integer-attribute.md | 14 + .../examples/databases/create-ip-attribute.md | 15 + .../create-relationship-attribute.md | 20 + .../databases/create-string-attribute.md | 16 + .../databases/create-url-attribute.md | 15 + .../examples/databases/create.md | 12 + .../examples/databases/delete-attribute.md | 9 + .../examples/databases/delete-collection.md | 8 + .../examples/databases/delete-document.md | 9 + .../examples/databases/delete-index.md | 9 + .../examples/databases/delete.md | 7 + .../examples/databases/get-attribute.md | 9 + .../examples/databases/get-collection.md | 23 + .../examples/databases/get-document.md | 15 + .../examples/databases/get-index.md | 13 + .../server-graphql/examples/databases/get.md | 11 + .../examples/databases/list-attributes.md | 9 + .../examples/databases/list-collections.md | 25 + .../examples/databases/list-documents.md | 17 + .../examples/databases/list-indexes.md | 15 + .../server-graphql/examples/databases/list.md | 12 + .../databases/update-boolean-attribute.md | 15 + .../examples/databases/update-collection.md | 24 + .../databases/update-datetime-attribute.md | 16 + .../examples/databases/update-document.md | 15 + .../databases/update-email-attribute.md | 16 + .../databases/update-enum-attribute.md | 18 + .../databases/update-float-attribute.md | 17 + .../databases/update-integer-attribute.md | 17 + .../examples/databases/update-ip-attribute.md | 16 + .../update-relationship-attribute.md | 19 + .../databases/update-string-attribute.md | 16 + .../databases/update-url-attribute.md | 16 + .../examples/databases/update.md | 12 + .../examples/functions/create-build.md | 9 + .../examples/functions/create-deployment.md | 24 + .../examples/functions/create-execution.md | 28 + .../examples/functions/create-variable.md | 15 + .../examples/functions/create.md | 38 + .../examples/functions/delete-deployment.md | 8 + .../examples/functions/delete-variable.md | 8 + .../examples/functions/delete.md | 7 + .../examples/functions/download-deployment.md | 8 + .../examples/functions/get-deployment.md | 30 + .../examples/functions/get-execution.md | 29 + .../examples/functions/get-variable.md | 14 + .../server-graphql/examples/functions/get.md | 36 + .../examples/functions/list-deployments.md | 32 + .../examples/functions/list-executions.md | 31 + .../examples/functions/list-runtimes.md | 14 + .../examples/functions/list-variables.md | 16 + .../server-graphql/examples/functions/list.md | 37 + .../examples/functions/update-deployment.md | 37 + .../examples/functions/update-variable.md | 15 + .../examples/functions/update.md | 38 + .../examples/health/get-antivirus.md | 6 + .../examples/health/get-cache.md | 7 + .../server-graphql/examples/health/get-d-b.md | 7 + .../examples/health/get-pub-sub.md | 7 + .../examples/health/get-queue-certificates.md | 5 + .../examples/health/get-queue-functions.md | 5 + .../examples/health/get-queue-logs.md | 5 + .../examples/health/get-queue-webhooks.md | 5 + .../examples/health/get-queue.md | 7 + .../examples/health/get-storage-local.md | 7 + .../examples/health/get-time.md | 7 + .../server-graphql/examples/health/get.md | 7 + .../server-graphql/examples/locale/get.md | 11 + .../examples/locale/list-codes.md | 9 + .../examples/locale/list-continents.md | 9 + .../examples/locale/list-countries-e-u.md | 9 + .../examples/locale/list-countries-phones.md | 10 + .../examples/locale/list-countries.md | 9 + .../examples/locale/list-currencies.md | 14 + .../examples/locale/list-languages.md | 10 + .../examples/storage/create-bucket.md | 19 + .../examples/storage/create-file.md | 25 + .../examples/storage/delete-bucket.md | 7 + .../examples/storage/delete-file.md | 8 + .../examples/storage/get-bucket.md | 18 + .../examples/storage/get-file-download.md | 8 + .../examples/storage/get-file-preview.md | 8 + .../examples/storage/get-file-view.md | 8 + .../examples/storage/get-file.md | 18 + .../examples/storage/list-buckets.md | 19 + .../examples/storage/list-files.md | 20 + .../examples/storage/update-bucket.md | 19 + .../examples/storage/update-file.md | 18 + .../examples/teams/create-membership.md | 20 + .../server-graphql/examples/teams/create.md | 15 + .../examples/teams/delete-membership.md | 8 + .../server-graphql/examples/teams/delete.md | 7 + .../examples/teams/get-membership.md | 19 + .../examples/teams/get-prefs.md | 7 + .../server-graphql/examples/teams/get.md | 14 + .../examples/teams/list-memberships.md | 21 + .../server-graphql/examples/teams/list.md | 15 + .../teams/update-membership-status.md | 21 + .../examples/teams/update-membership.md | 20 + .../examples/teams/update-name.md | 15 + .../examples/teams/update-prefs.md | 8 + .../examples/users/create-argon2user.md | 24 + .../examples/users/create-bcrypt-user.md | 24 + .../examples/users/create-m-d5user.md | 24 + .../examples/users/create-p-h-pass-user.md | 24 + .../examples/users/create-s-h-a-user.md | 24 + .../users/create-scrypt-modified-user.md | 27 + .../examples/users/create-scrypt-user.md | 29 + .../server-graphql/examples/users/create.md | 22 + .../examples/users/delete-identity.md | 7 + .../examples/users/delete-session.md | 8 + .../examples/users/delete-sessions.md | 7 + .../server-graphql/examples/users/delete.md | 7 + .../examples/users/get-prefs.md | 7 + .../server-graphql/examples/users/get.md | 22 + .../examples/users/list-identities.md | 17 + .../examples/users/list-logs.md | 30 + .../examples/users/list-memberships.md | 21 + .../examples/users/list-sessions.md | 34 + .../server-graphql/examples/users/list.md | 23 + .../users/update-email-verification.md | 23 + .../examples/users/update-email.md | 23 + .../examples/users/update-labels.md | 23 + .../examples/users/update-name.md | 23 + .../examples/users/update-password.md | 23 + .../users/update-phone-verification.md | 23 + .../examples/users/update-phone.md | 23 + .../examples/users/update-prefs.md | 8 + .../examples/users/update-status.md | 23 + .../java/account/create-phone-verification.md | 19 + .../java/account/create-recovery.md | 23 + .../java/account/create-verification.md | 22 + .../java/account/delete-identity.md | 22 + .../java/account/delete-session.md | 22 + .../java/account/delete-sessions.md | 19 + .../server-kotlin/java/account/get-prefs.md | 19 + .../server-kotlin/java/account/get-session.md | 22 + .../1.4.x/server-kotlin/java/account/get.md | 19 + .../java/account/list-identities.md | 21 + .../server-kotlin/java/account/list-logs.md | 21 + .../java/account/list-sessions.md | 19 + .../java/account/update-email.md | 23 + .../server-kotlin/java/account/update-name.md | 22 + .../java/account/update-password.md | 22 + .../java/account/update-phone-verification.md | 23 + .../java/account/update-phone.md | 23 + .../java/account/update-prefs.md | 22 + .../java/account/update-recovery.md | 25 + .../java/account/update-session.md | 22 + .../java/account/update-status.md | 19 + .../java/account/update-verification.md | 23 + .../server-kotlin/java/avatars/get-browser.md | 22 + .../java/avatars/get-credit-card.md | 22 + .../server-kotlin/java/avatars/get-favicon.md | 22 + .../server-kotlin/java/avatars/get-flag.md | 22 + .../server-kotlin/java/avatars/get-image.md | 22 + .../java/avatars/get-initials.md | 21 + .../server-kotlin/java/avatars/get-q-r.md | 22 + .../databases/create-boolean-attribute.md | 25 + .../java/databases/create-collection.md | 24 + .../databases/create-datetime-attribute.md | 25 + .../java/databases/create-document.md | 25 + .../java/databases/create-email-attribute.md | 25 + .../java/databases/create-enum-attribute.md | 26 + .../java/databases/create-float-attribute.md | 25 + .../java/databases/create-index.md | 26 + .../databases/create-integer-attribute.md | 25 + .../java/databases/create-ip-attribute.md | 25 + .../create-relationship-attribute.md | 25 + .../java/databases/create-string-attribute.md | 26 + .../java/databases/create-url-attribute.md | 25 + .../server-kotlin/java/databases/create.md | 23 + .../java/databases/delete-attribute.md | 24 + .../java/databases/delete-collection.md | 23 + .../java/databases/delete-document.md | 24 + .../java/databases/delete-index.md | 24 + .../server-kotlin/java/databases/delete.md | 22 + .../java/databases/get-attribute.md | 24 + .../java/databases/get-collection.md | 23 + .../java/databases/get-document.md | 24 + .../server-kotlin/java/databases/get-index.md | 24 + .../1.4.x/server-kotlin/java/databases/get.md | 22 + .../java/databases/list-attributes.md | 23 + .../java/databases/list-collections.md | 22 + .../java/databases/list-documents.md | 23 + .../java/databases/list-indexes.md | 23 + .../server-kotlin/java/databases/list.md | 21 + .../databases/update-boolean-attribute.md | 26 + .../java/databases/update-collection.md | 24 + .../databases/update-datetime-attribute.md | 26 + .../java/databases/update-document.md | 24 + .../java/databases/update-email-attribute.md | 26 + .../java/databases/update-enum-attribute.md | 27 + .../java/databases/update-float-attribute.md | 28 + .../databases/update-integer-attribute.md | 28 + .../java/databases/update-ip-attribute.md | 26 + .../update-relationship-attribute.md | 24 + .../java/databases/update-string-attribute.md | 26 + .../java/databases/update-url-attribute.md | 26 + .../server-kotlin/java/databases/update.md | 23 + .../java/functions/create-build.md | 24 + .../java/functions/create-deployment.md | 25 + .../java/functions/create-execution.md | 22 + .../java/functions/create-variable.md | 24 + .../server-kotlin/java/functions/create.md | 24 + .../java/functions/delete-deployment.md | 23 + .../java/functions/delete-variable.md | 23 + .../server-kotlin/java/functions/delete.md | 22 + .../java/functions/download-deployment.md | 23 + .../java/functions/get-deployment.md | 23 + .../java/functions/get-execution.md | 23 + .../java/functions/get-variable.md | 23 + .../1.4.x/server-kotlin/java/functions/get.md | 22 + .../java/functions/list-deployments.md | 22 + .../java/functions/list-executions.md | 22 + .../java/functions/list-runtimes.md | 19 + .../java/functions/list-variables.md | 22 + .../server-kotlin/java/functions/list.md | 21 + .../java/functions/update-deployment.md | 23 + .../java/functions/update-variable.md | 24 + .../server-kotlin/java/functions/update.md | 24 + .../server-kotlin/java/graphql/mutation.md | 22 + .../1.4.x/server-kotlin/java/graphql/query.md | 22 + .../java/health/get-antivirus.md | 19 + .../server-kotlin/java/health/get-cache.md | 19 + .../server-kotlin/java/health/get-d-b.md | 19 + .../server-kotlin/java/health/get-pub-sub.md | 19 + .../java/health/get-queue-certificates.md | 19 + .../java/health/get-queue-functions.md | 19 + .../java/health/get-queue-logs.md | 19 + .../java/health/get-queue-webhooks.md | 19 + .../server-kotlin/java/health/get-queue.md | 19 + .../java/health/get-storage-local.md | 19 + .../server-kotlin/java/health/get-time.md | 19 + .../1.4.x/server-kotlin/java/health/get.md | 19 + .../1.4.x/server-kotlin/java/locale/get.md | 19 + .../server-kotlin/java/locale/list-codes.md | 19 + .../java/locale/list-continents.md | 19 + .../java/locale/list-countries-e-u.md | 19 + .../java/locale/list-countries-phones.md | 19 + .../java/locale/list-countries.md | 19 + .../java/locale/list-currencies.md | 19 + .../java/locale/list-languages.md | 19 + .../java/storage/create-bucket.md | 23 + .../server-kotlin/java/storage/create-file.md | 25 + .../java/storage/delete-bucket.md | 22 + .../server-kotlin/java/storage/delete-file.md | 23 + .../server-kotlin/java/storage/get-bucket.md | 22 + .../java/storage/get-file-download.md | 23 + .../java/storage/get-file-preview.md | 23 + .../java/storage/get-file-view.md | 23 + .../server-kotlin/java/storage/get-file.md | 23 + .../java/storage/list-buckets.md | 21 + .../server-kotlin/java/storage/list-files.md | 22 + .../java/storage/update-bucket.md | 23 + .../server-kotlin/java/storage/update-file.md | 23 + .../java/teams/create-membership.md | 24 + .../1.4.x/server-kotlin/java/teams/create.md | 23 + .../java/teams/delete-membership.md | 23 + .../1.4.x/server-kotlin/java/teams/delete.md | 22 + .../java/teams/get-membership.md | 23 + .../server-kotlin/java/teams/get-prefs.md | 22 + .../1.4.x/server-kotlin/java/teams/get.md | 22 + .../java/teams/list-memberships.md | 22 + .../1.4.x/server-kotlin/java/teams/list.md | 21 + .../java/teams/update-membership-status.md | 25 + .../java/teams/update-membership.md | 24 + .../server-kotlin/java/teams/update-name.md | 23 + .../server-kotlin/java/teams/update-prefs.md | 23 + .../java/users/create-argon2user.md | 24 + .../java/users/create-bcrypt-user.md | 24 + .../java/users/create-m-d5user.md | 24 + .../java/users/create-p-h-pass-user.md | 24 + .../java/users/create-s-h-a-user.md | 24 + .../java/users/create-scrypt-modified-user.md | 27 + .../java/users/create-scrypt-user.md | 29 + .../1.4.x/server-kotlin/java/users/create.md | 22 + .../java/users/delete-identity.md | 22 + .../java/users/delete-session.md | 23 + .../java/users/delete-sessions.md | 22 + .../1.4.x/server-kotlin/java/users/delete.md | 22 + .../server-kotlin/java/users/get-prefs.md | 22 + .../1.4.x/server-kotlin/java/users/get.md | 22 + .../java/users/list-identities.md | 21 + .../server-kotlin/java/users/list-logs.md | 22 + .../java/users/list-memberships.md | 22 + .../server-kotlin/java/users/list-sessions.md | 22 + .../1.4.x/server-kotlin/java/users/list.md | 21 + .../java/users/update-email-verification.md | 23 + .../server-kotlin/java/users/update-email.md | 23 + .../server-kotlin/java/users/update-labels.md | 23 + .../server-kotlin/java/users/update-name.md | 23 + .../java/users/update-password.md | 23 + .../java/users/update-phone-verification.md | 23 + .../server-kotlin/java/users/update-phone.md | 23 + .../server-kotlin/java/users/update-prefs.md | 23 + .../server-kotlin/java/users/update-status.md | 23 + .../account/create-phone-verification.md | 11 + .../kotlin/account/create-recovery.md | 14 + .../kotlin/account/create-verification.md | 13 + .../kotlin/account/delete-identity.md | 13 + .../kotlin/account/delete-session.md | 13 + .../kotlin/account/delete-sessions.md | 11 + .../server-kotlin/kotlin/account/get-prefs.md | 11 + .../kotlin/account/get-session.md | 13 + .../1.4.x/server-kotlin/kotlin/account/get.md | 11 + .../kotlin/account/list-identities.md | 12 + .../server-kotlin/kotlin/account/list-logs.md | 12 + .../kotlin/account/list-sessions.md | 11 + .../kotlin/account/update-email.md | 14 + .../kotlin/account/update-name.md | 13 + .../kotlin/account/update-password.md | 13 + .../account/update-phone-verification.md | 14 + .../kotlin/account/update-phone.md | 14 + .../kotlin/account/update-prefs.md | 13 + .../kotlin/account/update-recovery.md | 16 + .../kotlin/account/update-session.md | 13 + .../kotlin/account/update-status.md | 11 + .../kotlin/account/update-verification.md | 14 + .../kotlin/avatars/get-browser.md | 13 + .../kotlin/avatars/get-credit-card.md | 13 + .../kotlin/avatars/get-favicon.md | 13 + .../server-kotlin/kotlin/avatars/get-flag.md | 13 + .../server-kotlin/kotlin/avatars/get-image.md | 13 + .../kotlin/avatars/get-initials.md | 12 + .../server-kotlin/kotlin/avatars/get-q-r.md | 13 + .../databases/create-boolean-attribute.md | 16 + .../kotlin/databases/create-collection.md | 15 + .../databases/create-datetime-attribute.md | 16 + .../kotlin/databases/create-document.md | 16 + .../databases/create-email-attribute.md | 16 + .../kotlin/databases/create-enum-attribute.md | 17 + .../databases/create-float-attribute.md | 16 + .../kotlin/databases/create-index.md | 17 + .../databases/create-integer-attribute.md | 16 + .../kotlin/databases/create-ip-attribute.md | 16 + .../create-relationship-attribute.md | 16 + .../databases/create-string-attribute.md | 17 + .../kotlin/databases/create-url-attribute.md | 16 + .../server-kotlin/kotlin/databases/create.md | 14 + .../kotlin/databases/delete-attribute.md | 15 + .../kotlin/databases/delete-collection.md | 14 + .../kotlin/databases/delete-document.md | 15 + .../kotlin/databases/delete-index.md | 15 + .../server-kotlin/kotlin/databases/delete.md | 13 + .../kotlin/databases/get-attribute.md | 15 + .../kotlin/databases/get-collection.md | 14 + .../kotlin/databases/get-document.md | 15 + .../kotlin/databases/get-index.md | 15 + .../server-kotlin/kotlin/databases/get.md | 13 + .../kotlin/databases/list-attributes.md | 14 + .../kotlin/databases/list-collections.md | 13 + .../kotlin/databases/list-documents.md | 14 + .../kotlin/databases/list-indexes.md | 14 + .../server-kotlin/kotlin/databases/list.md | 12 + .../databases/update-boolean-attribute.md | 17 + .../kotlin/databases/update-collection.md | 15 + .../databases/update-datetime-attribute.md | 17 + .../kotlin/databases/update-document.md | 15 + .../databases/update-email-attribute.md | 17 + .../kotlin/databases/update-enum-attribute.md | 18 + .../databases/update-float-attribute.md | 19 + .../databases/update-integer-attribute.md | 19 + .../kotlin/databases/update-ip-attribute.md | 17 + .../update-relationship-attribute.md | 15 + .../databases/update-string-attribute.md | 17 + .../kotlin/databases/update-url-attribute.md | 17 + .../server-kotlin/kotlin/databases/update.md | 14 + .../kotlin/functions/create-build.md | 15 + .../kotlin/functions/create-deployment.md | 16 + .../kotlin/functions/create-execution.md | 13 + .../kotlin/functions/create-variable.md | 15 + .../server-kotlin/kotlin/functions/create.md | 15 + .../kotlin/functions/delete-deployment.md | 14 + .../kotlin/functions/delete-variable.md | 14 + .../server-kotlin/kotlin/functions/delete.md | 13 + .../kotlin/functions/download-deployment.md | 14 + .../kotlin/functions/get-deployment.md | 14 + .../kotlin/functions/get-execution.md | 14 + .../kotlin/functions/get-variable.md | 14 + .../server-kotlin/kotlin/functions/get.md | 13 + .../kotlin/functions/list-deployments.md | 13 + .../kotlin/functions/list-executions.md | 13 + .../kotlin/functions/list-runtimes.md | 11 + .../kotlin/functions/list-variables.md | 13 + .../server-kotlin/kotlin/functions/list.md | 12 + .../kotlin/functions/update-deployment.md | 14 + .../kotlin/functions/update-variable.md | 15 + .../server-kotlin/kotlin/functions/update.md | 15 + .../server-kotlin/kotlin/graphql/mutation.md | 13 + .../server-kotlin/kotlin/graphql/query.md | 13 + .../kotlin/health/get-antivirus.md | 11 + .../server-kotlin/kotlin/health/get-cache.md | 11 + .../server-kotlin/kotlin/health/get-d-b.md | 11 + .../kotlin/health/get-pub-sub.md | 11 + .../kotlin/health/get-queue-certificates.md | 11 + .../kotlin/health/get-queue-functions.md | 11 + .../kotlin/health/get-queue-logs.md | 11 + .../kotlin/health/get-queue-webhooks.md | 11 + .../server-kotlin/kotlin/health/get-queue.md | 11 + .../kotlin/health/get-storage-local.md | 11 + .../server-kotlin/kotlin/health/get-time.md | 11 + .../1.4.x/server-kotlin/kotlin/health/get.md | 11 + .../1.4.x/server-kotlin/kotlin/locale/get.md | 11 + .../server-kotlin/kotlin/locale/list-codes.md | 11 + .../kotlin/locale/list-continents.md | 11 + .../kotlin/locale/list-countries-e-u.md | 11 + .../kotlin/locale/list-countries-phones.md | 11 + .../kotlin/locale/list-countries.md | 11 + .../kotlin/locale/list-currencies.md | 11 + .../kotlin/locale/list-languages.md | 11 + .../kotlin/storage/create-bucket.md | 14 + .../kotlin/storage/create-file.md | 16 + .../kotlin/storage/delete-bucket.md | 13 + .../kotlin/storage/delete-file.md | 14 + .../kotlin/storage/get-bucket.md | 13 + .../kotlin/storage/get-file-download.md | 14 + .../kotlin/storage/get-file-preview.md | 14 + .../kotlin/storage/get-file-view.md | 14 + .../server-kotlin/kotlin/storage/get-file.md | 14 + .../kotlin/storage/list-buckets.md | 12 + .../kotlin/storage/list-files.md | 13 + .../kotlin/storage/update-bucket.md | 14 + .../kotlin/storage/update-file.md | 14 + .../kotlin/teams/create-membership.md | 15 + .../server-kotlin/kotlin/teams/create.md | 14 + .../kotlin/teams/delete-membership.md | 14 + .../server-kotlin/kotlin/teams/delete.md | 13 + .../kotlin/teams/get-membership.md | 14 + .../server-kotlin/kotlin/teams/get-prefs.md | 13 + .../1.4.x/server-kotlin/kotlin/teams/get.md | 13 + .../kotlin/teams/list-memberships.md | 13 + .../1.4.x/server-kotlin/kotlin/teams/list.md | 12 + .../kotlin/teams/update-membership-status.md | 16 + .../kotlin/teams/update-membership.md | 15 + .../server-kotlin/kotlin/teams/update-name.md | 14 + .../kotlin/teams/update-prefs.md | 14 + .../kotlin/users/create-argon2user.md | 15 + .../kotlin/users/create-bcrypt-user.md | 15 + .../kotlin/users/create-m-d5user.md | 15 + .../kotlin/users/create-p-h-pass-user.md | 15 + .../kotlin/users/create-s-h-a-user.md | 15 + .../users/create-scrypt-modified-user.md | 18 + .../kotlin/users/create-scrypt-user.md | 20 + .../server-kotlin/kotlin/users/create.md | 13 + .../kotlin/users/delete-identity.md | 13 + .../kotlin/users/delete-session.md | 14 + .../kotlin/users/delete-sessions.md | 13 + .../server-kotlin/kotlin/users/delete.md | 13 + .../server-kotlin/kotlin/users/get-prefs.md | 13 + .../1.4.x/server-kotlin/kotlin/users/get.md | 13 + .../kotlin/users/list-identities.md | 12 + .../server-kotlin/kotlin/users/list-logs.md | 13 + .../kotlin/users/list-memberships.md | 13 + .../kotlin/users/list-sessions.md | 13 + .../1.4.x/server-kotlin/kotlin/users/list.md | 12 + .../kotlin/users/update-email-verification.md | 14 + .../kotlin/users/update-email.md | 14 + .../kotlin/users/update-labels.md | 14 + .../server-kotlin/kotlin/users/update-name.md | 14 + .../kotlin/users/update-password.md | 14 + .../kotlin/users/update-phone-verification.md | 14 + .../kotlin/users/update-phone.md | 14 + .../kotlin/users/update-prefs.md | 14 + .../kotlin/users/update-status.md | 14 + .../account/create-phone-verification.md | 20 + .../examples/account/create-recovery.md | 20 + .../examples/account/create-verification.md | 20 + .../examples/account/delete-identity.md | 20 + .../examples/account/delete-session.md | 20 + .../examples/account/delete-sessions.md | 20 + .../examples/account/get-prefs.md | 20 + .../examples/account/get-session.md | 20 + .../server-nodejs/examples/account/get.md | 20 + .../examples/account/list-identities.md | 20 + .../examples/account/list-logs.md | 20 + .../examples/account/list-sessions.md | 20 + .../examples/account/update-email.md | 20 + .../examples/account/update-name.md | 20 + .../examples/account/update-password.md | 20 + .../account/update-phone-verification.md | 20 + .../examples/account/update-phone.md | 20 + .../examples/account/update-prefs.md | 20 + .../examples/account/update-recovery.md | 20 + .../examples/account/update-session.md | 20 + .../examples/account/update-status.md | 20 + .../examples/account/update-verification.md | 20 + .../examples/avatars/get-browser.md | 20 + .../examples/avatars/get-credit-card.md | 20 + .../examples/avatars/get-favicon.md | 20 + .../examples/avatars/get-flag.md | 20 + .../examples/avatars/get-image.md | 20 + .../examples/avatars/get-initials.md | 20 + .../server-nodejs/examples/avatars/get-q-r.md | 20 + .../databases/create-boolean-attribute.md | 20 + .../examples/databases/create-collection.md | 20 + .../databases/create-datetime-attribute.md | 20 + .../examples/databases/create-document.md | 20 + .../databases/create-email-attribute.md | 20 + .../databases/create-enum-attribute.md | 20 + .../databases/create-float-attribute.md | 20 + .../examples/databases/create-index.md | 20 + .../databases/create-integer-attribute.md | 20 + .../examples/databases/create-ip-attribute.md | 20 + .../create-relationship-attribute.md | 20 + .../databases/create-string-attribute.md | 20 + .../databases/create-url-attribute.md | 20 + .../examples/databases/create.md | 20 + .../examples/databases/delete-attribute.md | 20 + .../examples/databases/delete-collection.md | 20 + .../examples/databases/delete-document.md | 20 + .../examples/databases/delete-index.md | 20 + .../examples/databases/delete.md | 20 + .../examples/databases/get-attribute.md | 20 + .../examples/databases/get-collection.md | 20 + .../examples/databases/get-document.md | 20 + .../examples/databases/get-index.md | 20 + .../server-nodejs/examples/databases/get.md | 20 + .../examples/databases/list-attributes.md | 20 + .../examples/databases/list-collections.md | 20 + .../examples/databases/list-documents.md | 20 + .../examples/databases/list-indexes.md | 20 + .../server-nodejs/examples/databases/list.md | 20 + .../databases/update-boolean-attribute.md | 20 + .../examples/databases/update-collection.md | 20 + .../databases/update-datetime-attribute.md | 20 + .../examples/databases/update-document.md | 20 + .../databases/update-email-attribute.md | 20 + .../databases/update-enum-attribute.md | 20 + .../databases/update-float-attribute.md | 20 + .../databases/update-integer-attribute.md | 20 + .../examples/databases/update-ip-attribute.md | 20 + .../update-relationship-attribute.md | 20 + .../databases/update-string-attribute.md | 20 + .../databases/update-url-attribute.md | 20 + .../examples/databases/update.md | 20 + .../examples/functions/create-build.md | 20 + .../examples/functions/create-deployment.md | 21 + .../examples/functions/create-execution.md | 20 + .../examples/functions/create-variable.md | 20 + .../examples/functions/create.md | 20 + .../examples/functions/delete-deployment.md | 20 + .../examples/functions/delete-variable.md | 20 + .../examples/functions/delete.md | 20 + .../examples/functions/download-deployment.md | 20 + .../examples/functions/get-deployment.md | 20 + .../examples/functions/get-execution.md | 20 + .../examples/functions/get-variable.md | 20 + .../server-nodejs/examples/functions/get.md | 20 + .../examples/functions/list-deployments.md | 20 + .../examples/functions/list-executions.md | 20 + .../examples/functions/list-runtimes.md | 20 + .../examples/functions/list-variables.md | 20 + .../server-nodejs/examples/functions/list.md | 20 + .../examples/functions/update-deployment.md | 20 + .../examples/functions/update-variable.md | 20 + .../examples/functions/update.md | 20 + .../examples/graphql/mutation.md | 20 + .../server-nodejs/examples/graphql/query.md | 20 + .../examples/health/get-antivirus.md | 20 + .../examples/health/get-cache.md | 20 + .../server-nodejs/examples/health/get-d-b.md | 20 + .../examples/health/get-pub-sub.md | 20 + .../examples/health/get-queue-certificates.md | 20 + .../examples/health/get-queue-functions.md | 20 + .../examples/health/get-queue-logs.md | 20 + .../examples/health/get-queue-webhooks.md | 20 + .../examples/health/get-queue.md | 20 + .../examples/health/get-storage-local.md | 20 + .../server-nodejs/examples/health/get-time.md | 20 + .../server-nodejs/examples/health/get.md | 20 + .../server-nodejs/examples/locale/get.md | 20 + .../examples/locale/list-codes.md | 20 + .../examples/locale/list-continents.md | 20 + .../examples/locale/list-countries-e-u.md | 20 + .../examples/locale/list-countries-phones.md | 20 + .../examples/locale/list-countries.md | 20 + .../examples/locale/list-currencies.md | 20 + .../examples/locale/list-languages.md | 20 + .../examples/storage/create-bucket.md | 20 + .../examples/storage/create-file.md | 21 + .../examples/storage/delete-bucket.md | 20 + .../examples/storage/delete-file.md | 20 + .../examples/storage/get-bucket.md | 20 + .../examples/storage/get-file-download.md | 20 + .../examples/storage/get-file-preview.md | 20 + .../examples/storage/get-file-view.md | 20 + .../examples/storage/get-file.md | 20 + .../examples/storage/list-buckets.md | 20 + .../examples/storage/list-files.md | 20 + .../examples/storage/update-bucket.md | 20 + .../examples/storage/update-file.md | 20 + .../examples/teams/create-membership.md | 20 + .../server-nodejs/examples/teams/create.md | 20 + .../examples/teams/delete-membership.md | 20 + .../server-nodejs/examples/teams/delete.md | 20 + .../examples/teams/get-membership.md | 20 + .../server-nodejs/examples/teams/get-prefs.md | 20 + .../1.4.x/server-nodejs/examples/teams/get.md | 20 + .../examples/teams/list-memberships.md | 20 + .../server-nodejs/examples/teams/list.md | 20 + .../teams/update-membership-status.md | 20 + .../examples/teams/update-membership.md | 20 + .../examples/teams/update-name.md | 20 + .../examples/teams/update-prefs.md | 20 + .../examples/users/create-argon2user.md | 20 + .../examples/users/create-bcrypt-user.md | 20 + .../examples/users/create-m-d5user.md | 20 + .../examples/users/create-p-h-pass-user.md | 20 + .../examples/users/create-s-h-a-user.md | 20 + .../users/create-scrypt-modified-user.md | 20 + .../examples/users/create-scrypt-user.md | 20 + .../server-nodejs/examples/users/create.md | 20 + .../examples/users/delete-identity.md | 20 + .../examples/users/delete-session.md | 20 + .../examples/users/delete-sessions.md | 20 + .../server-nodejs/examples/users/delete.md | 20 + .../server-nodejs/examples/users/get-prefs.md | 20 + .../1.4.x/server-nodejs/examples/users/get.md | 20 + .../examples/users/list-identities.md | 20 + .../server-nodejs/examples/users/list-logs.md | 20 + .../examples/users/list-memberships.md | 20 + .../examples/users/list-sessions.md | 20 + .../server-nodejs/examples/users/list.md | 20 + .../users/update-email-verification.md | 20 + .../examples/users/update-email.md | 20 + .../examples/users/update-labels.md | 20 + .../examples/users/update-name.md | 20 + .../examples/users/update-password.md | 20 + .../users/update-phone-verification.md | 20 + .../examples/users/update-phone.md | 20 + .../examples/users/update-prefs.md | 20 + .../examples/users/update-status.md | 20 + .../account/create-phone-verification.md | 16 + .../examples/account/create-recovery.md | 16 + .../examples/account/create-verification.md | 16 + .../examples/account/delete-identity.md | 16 + .../examples/account/delete-session.md | 16 + .../examples/account/delete-sessions.md | 16 + .../server-php/examples/account/get-prefs.md | 16 + .../examples/account/get-session.md | 16 + .../1.4.x/server-php/examples/account/get.md | 16 + .../examples/account/list-identities.md | 16 + .../server-php/examples/account/list-logs.md | 16 + .../examples/account/list-sessions.md | 16 + .../examples/account/update-email.md | 16 + .../examples/account/update-name.md | 16 + .../examples/account/update-password.md | 16 + .../account/update-phone-verification.md | 16 + .../examples/account/update-phone.md | 16 + .../examples/account/update-prefs.md | 16 + .../examples/account/update-recovery.md | 16 + .../examples/account/update-session.md | 16 + .../examples/account/update-status.md | 16 + .../examples/account/update-verification.md | 16 + .../examples/avatars/get-browser.md | 16 + .../examples/avatars/get-credit-card.md | 16 + .../examples/avatars/get-favicon.md | 16 + .../server-php/examples/avatars/get-flag.md | 16 + .../server-php/examples/avatars/get-image.md | 16 + .../examples/avatars/get-initials.md | 16 + .../server-php/examples/avatars/get-q-r.md | 16 + .../databases/create-boolean-attribute.md | 16 + .../examples/databases/create-collection.md | 16 + .../databases/create-datetime-attribute.md | 16 + .../examples/databases/create-document.md | 16 + .../databases/create-email-attribute.md | 16 + .../databases/create-enum-attribute.md | 16 + .../databases/create-float-attribute.md | 16 + .../examples/databases/create-index.md | 16 + .../databases/create-integer-attribute.md | 16 + .../examples/databases/create-ip-attribute.md | 16 + .../create-relationship-attribute.md | 16 + .../databases/create-string-attribute.md | 16 + .../databases/create-url-attribute.md | 16 + .../server-php/examples/databases/create.md | 16 + .../examples/databases/delete-attribute.md | 16 + .../examples/databases/delete-collection.md | 16 + .../examples/databases/delete-document.md | 16 + .../examples/databases/delete-index.md | 16 + .../server-php/examples/databases/delete.md | 16 + .../examples/databases/get-attribute.md | 16 + .../examples/databases/get-collection.md | 16 + .../examples/databases/get-document.md | 16 + .../examples/databases/get-index.md | 16 + .../server-php/examples/databases/get.md | 16 + .../examples/databases/list-attributes.md | 16 + .../examples/databases/list-collections.md | 16 + .../examples/databases/list-documents.md | 16 + .../examples/databases/list-indexes.md | 16 + .../server-php/examples/databases/list.md | 16 + .../databases/update-boolean-attribute.md | 16 + .../examples/databases/update-collection.md | 16 + .../databases/update-datetime-attribute.md | 16 + .../examples/databases/update-document.md | 16 + .../databases/update-email-attribute.md | 16 + .../databases/update-enum-attribute.md | 16 + .../databases/update-float-attribute.md | 16 + .../databases/update-integer-attribute.md | 16 + .../examples/databases/update-ip-attribute.md | 16 + .../update-relationship-attribute.md | 16 + .../databases/update-string-attribute.md | 16 + .../databases/update-url-attribute.md | 16 + .../server-php/examples/databases/update.md | 16 + .../examples/functions/create-build.md | 16 + .../examples/functions/create-deployment.md | 17 + .../examples/functions/create-execution.md | 16 + .../examples/functions/create-variable.md | 16 + .../server-php/examples/functions/create.md | 16 + .../examples/functions/delete-deployment.md | 16 + .../examples/functions/delete-variable.md | 16 + .../server-php/examples/functions/delete.md | 16 + .../examples/functions/download-deployment.md | 16 + .../examples/functions/get-deployment.md | 16 + .../examples/functions/get-execution.md | 16 + .../examples/functions/get-variable.md | 16 + .../server-php/examples/functions/get.md | 16 + .../examples/functions/list-deployments.md | 16 + .../examples/functions/list-executions.md | 16 + .../examples/functions/list-runtimes.md | 16 + .../examples/functions/list-variables.md | 16 + .../server-php/examples/functions/list.md | 16 + .../examples/functions/update-deployment.md | 16 + .../examples/functions/update-variable.md | 16 + .../server-php/examples/functions/update.md | 16 + .../server-php/examples/graphql/mutation.md | 16 + .../server-php/examples/graphql/query.md | 16 + .../examples/health/get-antivirus.md | 16 + .../server-php/examples/health/get-cache.md | 16 + .../server-php/examples/health/get-d-b.md | 16 + .../server-php/examples/health/get-pub-sub.md | 16 + .../examples/health/get-queue-certificates.md | 16 + .../examples/health/get-queue-functions.md | 16 + .../examples/health/get-queue-logs.md | 16 + .../examples/health/get-queue-webhooks.md | 16 + .../server-php/examples/health/get-queue.md | 16 + .../examples/health/get-storage-local.md | 16 + .../server-php/examples/health/get-time.md | 16 + .../1.4.x/server-php/examples/health/get.md | 16 + .../1.4.x/server-php/examples/locale/get.md | 16 + .../server-php/examples/locale/list-codes.md | 16 + .../examples/locale/list-continents.md | 16 + .../examples/locale/list-countries-e-u.md | 16 + .../examples/locale/list-countries-phones.md | 16 + .../examples/locale/list-countries.md | 16 + .../examples/locale/list-currencies.md | 16 + .../examples/locale/list-languages.md | 16 + .../examples/storage/create-bucket.md | 16 + .../examples/storage/create-file.md | 17 + .../examples/storage/delete-bucket.md | 16 + .../examples/storage/delete-file.md | 16 + .../server-php/examples/storage/get-bucket.md | 16 + .../examples/storage/get-file-download.md | 16 + .../examples/storage/get-file-preview.md | 16 + .../examples/storage/get-file-view.md | 16 + .../server-php/examples/storage/get-file.md | 16 + .../examples/storage/list-buckets.md | 16 + .../server-php/examples/storage/list-files.md | 16 + .../examples/storage/update-bucket.md | 16 + .../examples/storage/update-file.md | 16 + .../examples/teams/create-membership.md | 16 + .../1.4.x/server-php/examples/teams/create.md | 16 + .../examples/teams/delete-membership.md | 16 + .../1.4.x/server-php/examples/teams/delete.md | 16 + .../examples/teams/get-membership.md | 16 + .../server-php/examples/teams/get-prefs.md | 16 + .../1.4.x/server-php/examples/teams/get.md | 16 + .../examples/teams/list-memberships.md | 16 + .../1.4.x/server-php/examples/teams/list.md | 16 + .../teams/update-membership-status.md | 16 + .../examples/teams/update-membership.md | 16 + .../server-php/examples/teams/update-name.md | 16 + .../server-php/examples/teams/update-prefs.md | 16 + .../examples/users/create-argon2user.md | 16 + .../examples/users/create-bcrypt-user.md | 16 + .../examples/users/create-m-d5user.md | 16 + .../examples/users/create-p-h-pass-user.md | 16 + .../examples/users/create-s-h-a-user.md | 16 + .../users/create-scrypt-modified-user.md | 16 + .../examples/users/create-scrypt-user.md | 16 + .../1.4.x/server-php/examples/users/create.md | 16 + .../examples/users/delete-identity.md | 16 + .../examples/users/delete-session.md | 16 + .../examples/users/delete-sessions.md | 16 + .../1.4.x/server-php/examples/users/delete.md | 16 + .../server-php/examples/users/get-prefs.md | 16 + .../1.4.x/server-php/examples/users/get.md | 16 + .../examples/users/list-identities.md | 16 + .../server-php/examples/users/list-logs.md | 16 + .../examples/users/list-memberships.md | 16 + .../examples/users/list-sessions.md | 16 + .../1.4.x/server-php/examples/users/list.md | 16 + .../users/update-email-verification.md | 16 + .../server-php/examples/users/update-email.md | 16 + .../examples/users/update-labels.md | 16 + .../server-php/examples/users/update-name.md | 16 + .../examples/users/update-password.md | 16 + .../users/update-phone-verification.md | 16 + .../server-php/examples/users/update-phone.md | 16 + .../server-php/examples/users/update-prefs.md | 16 + .../examples/users/update-status.md | 16 + .../account/create-phone-verification.md | 14 + .../examples/account/create-recovery.md | 14 + .../examples/account/create-verification.md | 14 + .../examples/account/delete-identity.md | 14 + .../examples/account/delete-session.md | 14 + .../examples/account/delete-sessions.md | 14 + .../examples/account/get-prefs.md | 14 + .../examples/account/get-session.md | 14 + .../server-python/examples/account/get.md | 14 + .../examples/account/list-identities.md | 14 + .../examples/account/list-logs.md | 14 + .../examples/account/list-sessions.md | 14 + .../examples/account/update-email.md | 14 + .../examples/account/update-name.md | 14 + .../examples/account/update-password.md | 14 + .../account/update-phone-verification.md | 14 + .../examples/account/update-phone.md | 14 + .../examples/account/update-prefs.md | 14 + .../examples/account/update-recovery.md | 14 + .../examples/account/update-session.md | 14 + .../examples/account/update-status.md | 14 + .../examples/account/update-verification.md | 14 + .../examples/avatars/get-browser.md | 14 + .../examples/avatars/get-credit-card.md | 14 + .../examples/avatars/get-favicon.md | 14 + .../examples/avatars/get-flag.md | 14 + .../examples/avatars/get-image.md | 14 + .../examples/avatars/get-initials.md | 14 + .../server-python/examples/avatars/get-q-r.md | 14 + .../databases/create-boolean-attribute.md | 14 + .../examples/databases/create-collection.md | 14 + .../databases/create-datetime-attribute.md | 14 + .../examples/databases/create-document.md | 14 + .../databases/create-email-attribute.md | 14 + .../databases/create-enum-attribute.md | 14 + .../databases/create-float-attribute.md | 14 + .../examples/databases/create-index.md | 14 + .../databases/create-integer-attribute.md | 14 + .../examples/databases/create-ip-attribute.md | 14 + .../create-relationship-attribute.md | 14 + .../databases/create-string-attribute.md | 14 + .../databases/create-url-attribute.md | 14 + .../examples/databases/create.md | 14 + .../examples/databases/delete-attribute.md | 14 + .../examples/databases/delete-collection.md | 14 + .../examples/databases/delete-document.md | 14 + .../examples/databases/delete-index.md | 14 + .../examples/databases/delete.md | 14 + .../examples/databases/get-attribute.md | 14 + .../examples/databases/get-collection.md | 14 + .../examples/databases/get-document.md | 14 + .../examples/databases/get-index.md | 14 + .../server-python/examples/databases/get.md | 14 + .../examples/databases/list-attributes.md | 14 + .../examples/databases/list-collections.md | 14 + .../examples/databases/list-documents.md | 14 + .../examples/databases/list-indexes.md | 14 + .../server-python/examples/databases/list.md | 14 + .../databases/update-boolean-attribute.md | 14 + .../examples/databases/update-collection.md | 14 + .../databases/update-datetime-attribute.md | 14 + .../examples/databases/update-document.md | 14 + .../databases/update-email-attribute.md | 14 + .../databases/update-enum-attribute.md | 14 + .../databases/update-float-attribute.md | 14 + .../databases/update-integer-attribute.md | 14 + .../examples/databases/update-ip-attribute.md | 14 + .../update-relationship-attribute.md | 14 + .../databases/update-string-attribute.md | 14 + .../databases/update-url-attribute.md | 14 + .../examples/databases/update.md | 14 + .../examples/functions/create-build.md | 14 + .../examples/functions/create-deployment.md | 15 + .../examples/functions/create-execution.md | 14 + .../examples/functions/create-variable.md | 14 + .../examples/functions/create.md | 14 + .../examples/functions/delete-deployment.md | 14 + .../examples/functions/delete-variable.md | 14 + .../examples/functions/delete.md | 14 + .../examples/functions/download-deployment.md | 14 + .../examples/functions/get-deployment.md | 14 + .../examples/functions/get-execution.md | 14 + .../examples/functions/get-variable.md | 14 + .../server-python/examples/functions/get.md | 14 + .../examples/functions/list-deployments.md | 14 + .../examples/functions/list-executions.md | 14 + .../examples/functions/list-runtimes.md | 14 + .../examples/functions/list-variables.md | 14 + .../server-python/examples/functions/list.md | 14 + .../examples/functions/update-deployment.md | 14 + .../examples/functions/update-variable.md | 14 + .../examples/functions/update.md | 14 + .../examples/graphql/mutation.md | 14 + .../server-python/examples/graphql/query.md | 14 + .../examples/health/get-antivirus.md | 14 + .../examples/health/get-cache.md | 14 + .../server-python/examples/health/get-d-b.md | 14 + .../examples/health/get-pub-sub.md | 14 + .../examples/health/get-queue-certificates.md | 14 + .../examples/health/get-queue-functions.md | 14 + .../examples/health/get-queue-logs.md | 14 + .../examples/health/get-queue-webhooks.md | 14 + .../examples/health/get-queue.md | 14 + .../examples/health/get-storage-local.md | 14 + .../server-python/examples/health/get-time.md | 14 + .../server-python/examples/health/get.md | 14 + .../server-python/examples/locale/get.md | 14 + .../examples/locale/list-codes.md | 14 + .../examples/locale/list-continents.md | 14 + .../examples/locale/list-countries-e-u.md | 14 + .../examples/locale/list-countries-phones.md | 14 + .../examples/locale/list-countries.md | 14 + .../examples/locale/list-currencies.md | 14 + .../examples/locale/list-languages.md | 14 + .../examples/storage/create-bucket.md | 14 + .../examples/storage/create-file.md | 15 + .../examples/storage/delete-bucket.md | 14 + .../examples/storage/delete-file.md | 14 + .../examples/storage/get-bucket.md | 14 + .../examples/storage/get-file-download.md | 14 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 14 + .../examples/storage/get-file.md | 14 + .../examples/storage/list-buckets.md | 14 + .../examples/storage/list-files.md | 14 + .../examples/storage/update-bucket.md | 14 + .../examples/storage/update-file.md | 14 + .../examples/teams/create-membership.md | 14 + .../server-python/examples/teams/create.md | 14 + .../examples/teams/delete-membership.md | 14 + .../server-python/examples/teams/delete.md | 14 + .../examples/teams/get-membership.md | 14 + .../server-python/examples/teams/get-prefs.md | 14 + .../1.4.x/server-python/examples/teams/get.md | 14 + .../examples/teams/list-memberships.md | 14 + .../server-python/examples/teams/list.md | 14 + .../teams/update-membership-status.md | 14 + .../examples/teams/update-membership.md | 14 + .../examples/teams/update-name.md | 14 + .../examples/teams/update-prefs.md | 14 + .../examples/users/create-argon2user.md | 14 + .../examples/users/create-bcrypt-user.md | 14 + .../examples/users/create-m-d5user.md | 14 + .../examples/users/create-p-h-pass-user.md | 14 + .../examples/users/create-s-h-a-user.md | 14 + .../users/create-scrypt-modified-user.md | 14 + .../examples/users/create-scrypt-user.md | 14 + .../server-python/examples/users/create.md | 14 + .../examples/users/delete-identity.md | 14 + .../examples/users/delete-session.md | 14 + .../examples/users/delete-sessions.md | 14 + .../server-python/examples/users/delete.md | 14 + .../server-python/examples/users/get-prefs.md | 14 + .../1.4.x/server-python/examples/users/get.md | 14 + .../examples/users/list-identities.md | 14 + .../server-python/examples/users/list-logs.md | 14 + .../examples/users/list-memberships.md | 14 + .../examples/users/list-sessions.md | 14 + .../server-python/examples/users/list.md | 14 + .../users/update-email-verification.md | 14 + .../examples/users/update-email.md | 14 + .../examples/users/update-labels.md | 14 + .../examples/users/update-name.md | 14 + .../examples/users/update-password.md | 14 + .../users/update-phone-verification.md | 14 + .../examples/users/update-phone.md | 14 + .../examples/users/update-prefs.md | 14 + .../examples/users/update-status.md | 14 + .../account/create-phone-verification.md | 7 + .../examples/account/create-recovery.md | 11 + .../examples/account/create-verification.md | 10 + .../examples/account/delete-identity.md | 7 + .../examples/account/delete-session.md | 7 + .../examples/account/delete-sessions.md | 7 + .../server-rest/examples/account/get-prefs.md | 7 + .../examples/account/get-session.md | 7 + .../1.4.x/server-rest/examples/account/get.md | 7 + .../examples/account/list-identities.md | 7 + .../server-rest/examples/account/list-logs.md | 7 + .../examples/account/list-sessions.md | 7 + .../examples/account/update-email.md | 11 + .../examples/account/update-name.md | 10 + .../examples/account/update-password.md | 11 + .../account/update-phone-verification.md | 11 + .../examples/account/update-phone.md | 11 + .../examples/account/update-prefs.md | 10 + .../examples/account/update-recovery.md | 13 + .../examples/account/update-session.md | 7 + .../examples/account/update-status.md | 7 + .../examples/account/update-verification.md | 11 + .../examples/avatars/get-browser.md | 8 + .../examples/avatars/get-credit-card.md | 8 + .../examples/avatars/get-favicon.md | 8 + .../server-rest/examples/avatars/get-flag.md | 8 + .../server-rest/examples/avatars/get-image.md | 8 + .../examples/avatars/get-initials.md | 8 + .../server-rest/examples/avatars/get-q-r.md | 8 + .../databases/create-boolean-attribute.md | 13 + .../examples/databases/create-collection.md | 14 + .../databases/create-datetime-attribute.md | 13 + .../examples/databases/create-document.md | 13 + .../databases/create-email-attribute.md | 13 + .../databases/create-enum-attribute.md | 14 + .../databases/create-float-attribute.md | 15 + .../examples/databases/create-index.md | 13 + .../databases/create-integer-attribute.md | 15 + .../examples/databases/create-ip-attribute.md | 13 + .../create-relationship-attribute.md | 15 + .../databases/create-string-attribute.md | 15 + .../databases/create-url-attribute.md | 13 + .../server-rest/examples/databases/create.md | 12 + .../examples/databases/delete-attribute.md | 7 + .../examples/databases/delete-collection.md | 7 + .../examples/databases/delete-document.md | 8 + .../examples/databases/delete-index.md | 7 + .../server-rest/examples/databases/delete.md | 7 + .../examples/databases/get-attribute.md | 7 + .../examples/databases/get-collection.md | 7 + .../examples/databases/get-document.md | 8 + .../examples/databases/get-index.md | 7 + .../server-rest/examples/databases/get.md | 7 + .../examples/databases/list-attributes.md | 7 + .../examples/databases/list-collections.md | 7 + .../examples/databases/list-documents.md | 8 + .../examples/databases/list-indexes.md | 7 + .../server-rest/examples/databases/list.md | 7 + .../databases/update-boolean-attribute.md | 11 + .../examples/databases/update-collection.md | 13 + .../databases/update-datetime-attribute.md | 11 + .../examples/databases/update-document.md | 12 + .../databases/update-email-attribute.md | 11 + .../databases/update-enum-attribute.md | 12 + .../databases/update-float-attribute.md | 13 + .../databases/update-integer-attribute.md | 13 + .../examples/databases/update-ip-attribute.md | 11 + .../update-relationship-attribute.md | 10 + .../databases/update-string-attribute.md | 11 + .../databases/update-url-attribute.md | 11 + .../server-rest/examples/databases/update.md | 11 + .../examples/functions/create-build.md | 7 + .../examples/functions/create-deployment.md | 30 + .../examples/functions/create-execution.md | 15 + .../examples/functions/create-variable.md | 11 + .../server-rest/examples/functions/create.md | 29 + .../examples/functions/delete-deployment.md | 7 + .../examples/functions/delete-variable.md | 7 + .../server-rest/examples/functions/delete.md | 7 + .../examples/functions/download-deployment.md | 7 + .../examples/functions/get-deployment.md | 7 + .../examples/functions/get-execution.md | 8 + .../examples/functions/get-variable.md | 7 + .../server-rest/examples/functions/get.md | 7 + .../examples/functions/list-deployments.md | 7 + .../examples/functions/list-executions.md | 8 + .../examples/functions/list-runtimes.md | 7 + .../examples/functions/list-variables.md | 7 + .../server-rest/examples/functions/list.md | 7 + .../examples/functions/update-deployment.md | 7 + .../examples/functions/update-variable.md | 11 + .../server-rest/examples/functions/update.md | 24 + .../server-rest/examples/graphql/mutation.md | 12 + .../server-rest/examples/graphql/query.md | 12 + .../examples/health/get-antivirus.md | 7 + .../server-rest/examples/health/get-cache.md | 7 + .../server-rest/examples/health/get-d-b.md | 7 + .../examples/health/get-pub-sub.md | 7 + .../examples/health/get-queue-certificates.md | 7 + .../examples/health/get-queue-functions.md | 7 + .../examples/health/get-queue-logs.md | 7 + .../examples/health/get-queue-webhooks.md | 7 + .../server-rest/examples/health/get-queue.md | 7 + .../examples/health/get-storage-local.md | 7 + .../server-rest/examples/health/get-time.md | 7 + .../1.4.x/server-rest/examples/health/get.md | 7 + .../1.4.x/server-rest/examples/locale/get.md | 8 + .../server-rest/examples/locale/list-codes.md | 8 + .../examples/locale/list-continents.md | 8 + .../examples/locale/list-countries-e-u.md | 8 + .../examples/locale/list-countries-phones.md | 8 + .../examples/locale/list-countries.md | 8 + .../examples/locale/list-currencies.md | 8 + .../examples/locale/list-languages.md | 8 + .../examples/storage/create-bucket.md | 19 + .../examples/storage/create-file.md | 26 + .../examples/storage/delete-bucket.md | 7 + .../examples/storage/delete-file.md | 8 + .../examples/storage/get-bucket.md | 7 + .../examples/storage/get-file-download.md | 8 + .../examples/storage/get-file-preview.md | 8 + .../examples/storage/get-file-view.md | 8 + .../server-rest/examples/storage/get-file.md | 8 + .../examples/storage/list-buckets.md | 7 + .../examples/storage/list-files.md | 8 + .../examples/storage/update-bucket.md | 18 + .../examples/storage/update-file.md | 12 + .../examples/teams/create-membership.md | 16 + .../server-rest/examples/teams/create.md | 13 + .../examples/teams/delete-membership.md | 8 + .../server-rest/examples/teams/delete.md | 8 + .../examples/teams/get-membership.md | 8 + .../server-rest/examples/teams/get-prefs.md | 7 + .../1.4.x/server-rest/examples/teams/get.md | 8 + .../examples/teams/list-memberships.md | 8 + .../1.4.x/server-rest/examples/teams/list.md | 8 + .../teams/update-membership-status.md | 11 + .../examples/teams/update-membership.md | 11 + .../server-rest/examples/teams/update-name.md | 11 + .../examples/teams/update-prefs.md | 10 + .../examples/users/create-argon2user.md | 13 + .../examples/users/create-bcrypt-user.md | 13 + .../examples/users/create-m-d5user.md | 13 + .../examples/users/create-p-h-pass-user.md | 13 + .../examples/users/create-s-h-a-user.md | 14 + .../users/create-scrypt-modified-user.md | 16 + .../examples/users/create-scrypt-user.md | 18 + .../server-rest/examples/users/create.md | 14 + .../examples/users/delete-identity.md | 7 + .../examples/users/delete-session.md | 7 + .../examples/users/delete-sessions.md | 7 + .../server-rest/examples/users/delete.md | 7 + .../server-rest/examples/users/get-prefs.md | 7 + .../1.4.x/server-rest/examples/users/get.md | 7 + .../examples/users/list-identities.md | 7 + .../server-rest/examples/users/list-logs.md | 7 + .../examples/users/list-memberships.md | 7 + .../examples/users/list-sessions.md | 7 + .../1.4.x/server-rest/examples/users/list.md | 7 + .../users/update-email-verification.md | 10 + .../examples/users/update-email.md | 10 + .../examples/users/update-labels.md | 10 + .../server-rest/examples/users/update-name.md | 10 + .../examples/users/update-password.md | 10 + .../users/update-phone-verification.md | 10 + .../examples/users/update-phone.md | 10 + .../examples/users/update-prefs.md | 10 + .../examples/users/update-status.md | 10 + .../account/create-phone-verification.md | 14 + .../examples/account/create-recovery.md | 14 + .../examples/account/create-verification.md | 14 + .../examples/account/delete-identity.md | 14 + .../examples/account/delete-session.md | 14 + .../examples/account/delete-sessions.md | 14 + .../server-ruby/examples/account/get-prefs.md | 14 + .../examples/account/get-session.md | 14 + .../1.4.x/server-ruby/examples/account/get.md | 14 + .../examples/account/list-identities.md | 14 + .../server-ruby/examples/account/list-logs.md | 14 + .../examples/account/list-sessions.md | 14 + .../examples/account/update-email.md | 14 + .../examples/account/update-name.md | 14 + .../examples/account/update-password.md | 14 + .../account/update-phone-verification.md | 14 + .../examples/account/update-phone.md | 14 + .../examples/account/update-prefs.md | 14 + .../examples/account/update-recovery.md | 14 + .../examples/account/update-session.md | 14 + .../examples/account/update-status.md | 14 + .../examples/account/update-verification.md | 14 + .../examples/avatars/get-browser.md | 14 + .../examples/avatars/get-credit-card.md | 14 + .../examples/avatars/get-favicon.md | 14 + .../server-ruby/examples/avatars/get-flag.md | 14 + .../server-ruby/examples/avatars/get-image.md | 14 + .../examples/avatars/get-initials.md | 14 + .../server-ruby/examples/avatars/get-q-r.md | 14 + .../databases/create-boolean-attribute.md | 14 + .../examples/databases/create-collection.md | 14 + .../databases/create-datetime-attribute.md | 14 + .../examples/databases/create-document.md | 14 + .../databases/create-email-attribute.md | 14 + .../databases/create-enum-attribute.md | 14 + .../databases/create-float-attribute.md | 14 + .../examples/databases/create-index.md | 14 + .../databases/create-integer-attribute.md | 14 + .../examples/databases/create-ip-attribute.md | 14 + .../create-relationship-attribute.md | 14 + .../databases/create-string-attribute.md | 14 + .../databases/create-url-attribute.md | 14 + .../server-ruby/examples/databases/create.md | 14 + .../examples/databases/delete-attribute.md | 14 + .../examples/databases/delete-collection.md | 14 + .../examples/databases/delete-document.md | 14 + .../examples/databases/delete-index.md | 14 + .../server-ruby/examples/databases/delete.md | 14 + .../examples/databases/get-attribute.md | 14 + .../examples/databases/get-collection.md | 14 + .../examples/databases/get-document.md | 14 + .../examples/databases/get-index.md | 14 + .../server-ruby/examples/databases/get.md | 14 + .../examples/databases/list-attributes.md | 14 + .../examples/databases/list-collections.md | 14 + .../examples/databases/list-documents.md | 14 + .../examples/databases/list-indexes.md | 14 + .../server-ruby/examples/databases/list.md | 14 + .../databases/update-boolean-attribute.md | 14 + .../examples/databases/update-collection.md | 14 + .../databases/update-datetime-attribute.md | 14 + .../examples/databases/update-document.md | 14 + .../databases/update-email-attribute.md | 14 + .../databases/update-enum-attribute.md | 14 + .../databases/update-float-attribute.md | 14 + .../databases/update-integer-attribute.md | 14 + .../examples/databases/update-ip-attribute.md | 14 + .../update-relationship-attribute.md | 14 + .../databases/update-string-attribute.md | 14 + .../databases/update-url-attribute.md | 14 + .../server-ruby/examples/databases/update.md | 14 + .../examples/functions/create-build.md | 14 + .../examples/functions/create-deployment.md | 14 + .../examples/functions/create-execution.md | 14 + .../examples/functions/create-variable.md | 14 + .../server-ruby/examples/functions/create.md | 14 + .../examples/functions/delete-deployment.md | 14 + .../examples/functions/delete-variable.md | 14 + .../server-ruby/examples/functions/delete.md | 14 + .../examples/functions/download-deployment.md | 14 + .../examples/functions/get-deployment.md | 14 + .../examples/functions/get-execution.md | 14 + .../examples/functions/get-variable.md | 14 + .../server-ruby/examples/functions/get.md | 14 + .../examples/functions/list-deployments.md | 14 + .../examples/functions/list-executions.md | 14 + .../examples/functions/list-runtimes.md | 14 + .../examples/functions/list-variables.md | 14 + .../server-ruby/examples/functions/list.md | 14 + .../examples/functions/update-deployment.md | 14 + .../examples/functions/update-variable.md | 14 + .../server-ruby/examples/functions/update.md | 14 + .../server-ruby/examples/graphql/mutation.md | 14 + .../server-ruby/examples/graphql/query.md | 14 + .../examples/health/get-antivirus.md | 14 + .../server-ruby/examples/health/get-cache.md | 14 + .../server-ruby/examples/health/get-d-b.md | 14 + .../examples/health/get-pub-sub.md | 14 + .../examples/health/get-queue-certificates.md | 14 + .../examples/health/get-queue-functions.md | 14 + .../examples/health/get-queue-logs.md | 14 + .../examples/health/get-queue-webhooks.md | 14 + .../server-ruby/examples/health/get-queue.md | 14 + .../examples/health/get-storage-local.md | 14 + .../server-ruby/examples/health/get-time.md | 14 + .../1.4.x/server-ruby/examples/health/get.md | 14 + .../1.4.x/server-ruby/examples/locale/get.md | 14 + .../server-ruby/examples/locale/list-codes.md | 14 + .../examples/locale/list-continents.md | 14 + .../examples/locale/list-countries-e-u.md | 14 + .../examples/locale/list-countries-phones.md | 14 + .../examples/locale/list-countries.md | 14 + .../examples/locale/list-currencies.md | 14 + .../examples/locale/list-languages.md | 14 + .../examples/storage/create-bucket.md | 14 + .../examples/storage/create-file.md | 14 + .../examples/storage/delete-bucket.md | 14 + .../examples/storage/delete-file.md | 14 + .../examples/storage/get-bucket.md | 14 + .../examples/storage/get-file-download.md | 14 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 14 + .../server-ruby/examples/storage/get-file.md | 14 + .../examples/storage/list-buckets.md | 14 + .../examples/storage/list-files.md | 14 + .../examples/storage/update-bucket.md | 14 + .../examples/storage/update-file.md | 14 + .../examples/teams/create-membership.md | 14 + .../server-ruby/examples/teams/create.md | 14 + .../examples/teams/delete-membership.md | 14 + .../server-ruby/examples/teams/delete.md | 14 + .../examples/teams/get-membership.md | 14 + .../server-ruby/examples/teams/get-prefs.md | 14 + .../1.4.x/server-ruby/examples/teams/get.md | 14 + .../examples/teams/list-memberships.md | 14 + .../1.4.x/server-ruby/examples/teams/list.md | 14 + .../teams/update-membership-status.md | 14 + .../examples/teams/update-membership.md | 14 + .../server-ruby/examples/teams/update-name.md | 14 + .../examples/teams/update-prefs.md | 14 + .../examples/users/create-argon2user.md | 14 + .../examples/users/create-bcrypt-user.md | 14 + .../examples/users/create-m-d5user.md | 14 + .../examples/users/create-p-h-pass-user.md | 14 + .../examples/users/create-s-h-a-user.md | 14 + .../users/create-scrypt-modified-user.md | 14 + .../examples/users/create-scrypt-user.md | 14 + .../server-ruby/examples/users/create.md | 14 + .../examples/users/delete-identity.md | 14 + .../examples/users/delete-session.md | 14 + .../examples/users/delete-sessions.md | 14 + .../server-ruby/examples/users/delete.md | 14 + .../server-ruby/examples/users/get-prefs.md | 14 + .../1.4.x/server-ruby/examples/users/get.md | 14 + .../examples/users/list-identities.md | 14 + .../server-ruby/examples/users/list-logs.md | 14 + .../examples/users/list-memberships.md | 14 + .../examples/users/list-sessions.md | 14 + .../1.4.x/server-ruby/examples/users/list.md | 14 + .../users/update-email-verification.md | 14 + .../examples/users/update-email.md | 14 + .../examples/users/update-labels.md | 14 + .../server-ruby/examples/users/update-name.md | 14 + .../examples/users/update-password.md | 14 + .../users/update-phone-verification.md | 14 + .../examples/users/update-phone.md | 14 + .../examples/users/update-prefs.md | 14 + .../examples/users/update-status.md | 14 + .../account/create-phone-verification.md | 11 + .../examples/account/create-recovery.md | 14 + .../examples/account/create-verification.md | 13 + .../examples/account/delete-identity.md | 13 + .../examples/account/delete-session.md | 13 + .../examples/account/delete-sessions.md | 11 + .../examples/account/get-prefs.md | 11 + .../examples/account/get-session.md | 13 + .../server-swift/examples/account/get.md | 11 + .../examples/account/list-identities.md | 11 + .../examples/account/list-logs.md | 11 + .../examples/account/list-sessions.md | 11 + .../examples/account/update-email.md | 14 + .../examples/account/update-name.md | 13 + .../examples/account/update-password.md | 13 + .../account/update-phone-verification.md | 14 + .../examples/account/update-phone.md | 14 + .../examples/account/update-prefs.md | 13 + .../examples/account/update-recovery.md | 16 + .../examples/account/update-session.md | 13 + .../examples/account/update-status.md | 11 + .../examples/account/update-verification.md | 14 + .../examples/avatars/get-browser.md | 13 + .../examples/avatars/get-credit-card.md | 13 + .../examples/avatars/get-favicon.md | 13 + .../server-swift/examples/avatars/get-flag.md | 13 + .../examples/avatars/get-image.md | 13 + .../examples/avatars/get-initials.md | 11 + .../server-swift/examples/avatars/get-q-r.md | 13 + .../databases/create-boolean-attribute.md | 16 + .../examples/databases/create-collection.md | 15 + .../databases/create-datetime-attribute.md | 16 + .../examples/databases/create-document.md | 16 + .../databases/create-email-attribute.md | 16 + .../databases/create-enum-attribute.md | 17 + .../databases/create-float-attribute.md | 16 + .../examples/databases/create-index.md | 17 + .../databases/create-integer-attribute.md | 16 + .../examples/databases/create-ip-attribute.md | 16 + .../create-relationship-attribute.md | 16 + .../databases/create-string-attribute.md | 17 + .../databases/create-url-attribute.md | 16 + .../server-swift/examples/databases/create.md | 14 + .../examples/databases/delete-attribute.md | 15 + .../examples/databases/delete-collection.md | 14 + .../examples/databases/delete-document.md | 15 + .../examples/databases/delete-index.md | 15 + .../server-swift/examples/databases/delete.md | 13 + .../examples/databases/get-attribute.md | 15 + .../examples/databases/get-collection.md | 14 + .../examples/databases/get-document.md | 15 + .../examples/databases/get-index.md | 15 + .../server-swift/examples/databases/get.md | 13 + .../examples/databases/list-attributes.md | 14 + .../examples/databases/list-collections.md | 13 + .../examples/databases/list-documents.md | 14 + .../examples/databases/list-indexes.md | 14 + .../server-swift/examples/databases/list.md | 11 + .../databases/update-boolean-attribute.md | 17 + .../examples/databases/update-collection.md | 15 + .../databases/update-datetime-attribute.md | 17 + .../examples/databases/update-document.md | 15 + .../databases/update-email-attribute.md | 17 + .../databases/update-enum-attribute.md | 18 + .../databases/update-float-attribute.md | 19 + .../databases/update-integer-attribute.md | 19 + .../examples/databases/update-ip-attribute.md | 17 + .../update-relationship-attribute.md | 15 + .../databases/update-string-attribute.md | 17 + .../databases/update-url-attribute.md | 17 + .../server-swift/examples/databases/update.md | 14 + .../examples/functions/create-build.md | 15 + .../examples/functions/create-deployment.md | 15 + .../examples/functions/create-execution.md | 13 + .../examples/functions/create-variable.md | 15 + .../server-swift/examples/functions/create.md | 15 + .../examples/functions/delete-deployment.md | 14 + .../examples/functions/delete-variable.md | 14 + .../server-swift/examples/functions/delete.md | 13 + .../examples/functions/download-deployment.md | 14 + .../examples/functions/get-deployment.md | 14 + .../examples/functions/get-execution.md | 14 + .../examples/functions/get-variable.md | 14 + .../server-swift/examples/functions/get.md | 13 + .../examples/functions/list-deployments.md | 13 + .../examples/functions/list-executions.md | 13 + .../examples/functions/list-runtimes.md | 11 + .../examples/functions/list-variables.md | 13 + .../server-swift/examples/functions/list.md | 11 + .../examples/functions/update-deployment.md | 14 + .../examples/functions/update-variable.md | 15 + .../server-swift/examples/functions/update.md | 15 + .../server-swift/examples/graphql/mutation.md | 13 + .../server-swift/examples/graphql/query.md | 13 + .../examples/health/get-antivirus.md | 11 + .../server-swift/examples/health/get-cache.md | 11 + .../server-swift/examples/health/get-d-b.md | 11 + .../examples/health/get-pub-sub.md | 11 + .../examples/health/get-queue-certificates.md | 11 + .../examples/health/get-queue-functions.md | 11 + .../examples/health/get-queue-logs.md | 11 + .../examples/health/get-queue-webhooks.md | 11 + .../server-swift/examples/health/get-queue.md | 11 + .../examples/health/get-storage-local.md | 11 + .../server-swift/examples/health/get-time.md | 11 + .../1.4.x/server-swift/examples/health/get.md | 11 + .../1.4.x/server-swift/examples/locale/get.md | 11 + .../examples/locale/list-codes.md | 11 + .../examples/locale/list-continents.md | 11 + .../examples/locale/list-countries-e-u.md | 11 + .../examples/locale/list-countries-phones.md | 11 + .../examples/locale/list-countries.md | 11 + .../examples/locale/list-currencies.md | 11 + .../examples/locale/list-languages.md | 11 + .../examples/storage/create-bucket.md | 14 + .../examples/storage/create-file.md | 15 + .../examples/storage/delete-bucket.md | 13 + .../examples/storage/delete-file.md | 14 + .../examples/storage/get-bucket.md | 13 + .../examples/storage/get-file-download.md | 14 + .../examples/storage/get-file-preview.md | 14 + .../examples/storage/get-file-view.md | 14 + .../server-swift/examples/storage/get-file.md | 14 + .../examples/storage/list-buckets.md | 11 + .../examples/storage/list-files.md | 13 + .../examples/storage/update-bucket.md | 14 + .../examples/storage/update-file.md | 14 + .../examples/teams/create-membership.md | 15 + .../server-swift/examples/teams/create.md | 14 + .../examples/teams/delete-membership.md | 14 + .../server-swift/examples/teams/delete.md | 13 + .../examples/teams/get-membership.md | 14 + .../server-swift/examples/teams/get-prefs.md | 13 + .../1.4.x/server-swift/examples/teams/get.md | 13 + .../examples/teams/list-memberships.md | 13 + .../1.4.x/server-swift/examples/teams/list.md | 11 + .../teams/update-membership-status.md | 16 + .../examples/teams/update-membership.md | 15 + .../examples/teams/update-name.md | 14 + .../examples/teams/update-prefs.md | 14 + .../examples/users/create-argon2user.md | 15 + .../examples/users/create-bcrypt-user.md | 15 + .../examples/users/create-m-d5user.md | 15 + .../examples/users/create-p-h-pass-user.md | 15 + .../examples/users/create-s-h-a-user.md | 15 + .../users/create-scrypt-modified-user.md | 18 + .../examples/users/create-scrypt-user.md | 20 + .../server-swift/examples/users/create.md | 13 + .../examples/users/delete-identity.md | 13 + .../examples/users/delete-session.md | 14 + .../examples/users/delete-sessions.md | 13 + .../server-swift/examples/users/delete.md | 13 + .../server-swift/examples/users/get-prefs.md | 13 + .../1.4.x/server-swift/examples/users/get.md | 13 + .../examples/users/list-identities.md | 11 + .../server-swift/examples/users/list-logs.md | 13 + .../examples/users/list-memberships.md | 13 + .../examples/users/list-sessions.md | 13 + .../1.4.x/server-swift/examples/users/list.md | 11 + .../users/update-email-verification.md | 14 + .../examples/users/update-email.md | 14 + .../examples/users/update-labels.md | 14 + .../examples/users/update-name.md | 14 + .../examples/users/update-password.md | 14 + .../users/update-phone-verification.md | 14 + .../examples/users/update-phone.md | 14 + .../examples/users/update-prefs.md | 14 + .../examples/users/update-status.md | 14 + docs/references/account/delete-identity.md | 1 + docs/references/account/get-prefs.md | 2 +- docs/references/account/get.md | 2 +- docs/references/account/list-identities.md | 1 + docs/references/account/list-logs.md | 2 +- docs/references/account/list-sessions.md | 2 +- docs/references/functions/create-build.md | 1 + .../references/functions/create-deployment.md | 2 +- docs/references/functions/create-variable.md | 2 +- docs/references/project/create-variable.md | 1 + docs/references/project/delete-variable.md | 1 + docs/references/project/get-variable.md | 1 + docs/references/project/list-variables.md | 1 + docs/references/project/update-variable.md | 1 + docs/references/proxy/create-rule.md | 1 + docs/references/proxy/delete-rule.md | 1 + docs/references/proxy/get-rule.md | 1 + docs/references/proxy/list-rules.md | 1 + ...hip-roles.md => update-team-membership.md} | 2 +- docs/references/users/delete-identity.md | 1 + docs/references/users/list-identities.md | 1 + docs/sdks/dart/CHANGELOG.md | 15 + docs/sdks/flutter/CHANGELOG.md | 14 + docs/services/proxy.md | 3 + docs/services/vcs.md | 3 + docs/tutorials/add-oauth2-provider.md | 2 +- phpcs.xml | 2 + src/Appwrite/Auth/OAuth2.php | 2 +- src/Appwrite/Auth/OAuth2/Exception.php | 12 +- src/Appwrite/Auth/OAuth2/Firebase.php | 389 ++++ src/Appwrite/Auth/OAuth2/Github.php | 11 + src/Appwrite/Detector/Detector.php | 10 +- src/Appwrite/Event/Build.php | 17 +- src/Appwrite/Event/Delete.php | 3 +- src/Appwrite/Event/Event.php | 3 + src/Appwrite/Event/Func.php | 57 +- src/Appwrite/Event/Mail.php | 97 +- src/Appwrite/Event/Migration.php | 98 + src/Appwrite/Extend/Exception.php | 34 +- src/Appwrite/GraphQL/Resolvers.php | 2 +- src/Appwrite/GraphQL/Types/Mapper.php | 2 + src/Appwrite/Messaging/Adapter/Realtime.php | 10 + src/Appwrite/Migration/Migration.php | 84 +- src/Appwrite/Migration/Version/V17.php | 12 + src/Appwrite/Migration/Version/V19.php | 727 ++++++- src/Appwrite/Platform/Services/Tasks.php | 3 + src/Appwrite/Platform/Tasks/Install.php | 86 +- src/Appwrite/Platform/Tasks/Maintenance.php | 3 - src/Appwrite/Platform/Tasks/Migrate.php | 34 +- src/Appwrite/Platform/Tasks/SDKs.php | 4 +- src/Appwrite/Platform/Tasks/Specs.php | 2 - src/Appwrite/Platform/Tasks/Upgrade.php | 42 + src/Appwrite/Platform/Tasks/Usage.php | 60 + src/Appwrite/Resque/Worker.php | 108 +- .../Specification/Format/OpenAPI3.php | 3 + .../Specification/Format/Swagger2.php | 3 + src/Appwrite/Usage/Calculator.php | 15 + src/Appwrite/Usage/Calculators/TimeSeries.php | 557 +++++ src/Appwrite/Usage/Stats.php | 225 ++ .../Validator/Queries/Deployments.php | 3 +- .../Database/Validator/Queries/Executions.php | 2 +- .../Database/Validator/Queries/Functions.php | 5 +- .../Database/Validator/Queries/Identities.php | 23 + .../Validator/Queries/Installations.php | 20 + .../Database/Validator/Queries/Migrations.php | 25 + .../Database/Validator/Queries/Rules.php | 22 + .../Database/Validator/Queries/Variables.php | 4 +- src/Appwrite/Utopia/Request/Filters/V16.php | 48 + src/Appwrite/Utopia/Response.php | 85 +- src/Appwrite/Utopia/Response/Filters/V16.php | 109 + .../Utopia/Response/Model/BaseList.php | 2 +- src/Appwrite/Utopia/Response/Model/Branch.php | 40 + src/Appwrite/Utopia/Response/Model/Build.php | 6 + .../Utopia/Response/Model/Collection.php | 2 +- .../Response/Model/ConsoleVariables.php | 18 + .../Utopia/Response/Model/Database.php | 2 +- .../Utopia/Response/Model/Deployment.php | 89 +- .../Utopia/Response/Model/Detection.php | 40 + src/Appwrite/Utopia/Response/Model/Domain.php | 88 - .../Utopia/Response/Model/Execution.php | 54 +- src/Appwrite/Utopia/Response/Model/Func.php | 62 +- .../Utopia/Response/Model/Headers.php | 46 + .../Utopia/Response/Model/Identity.php | 95 + .../Utopia/Response/Model/Installation.php | 72 + .../Utopia/Response/Model/Migration.php | 96 + .../Model/MigrationFirebaseProject.php | 46 + .../Utopia/Response/Model/MigrationReport.php | 89 + .../Utopia/Response/Model/Project.php | 25 +- .../Response/Model/ProviderRepository.php | 78 + src/Appwrite/Utopia/Response/Model/Rule.php | 92 + .../Utopia/Response/Model/UsageBuckets.php | 30 +- .../Utopia/Response/Model/UsageCollection.php | 30 +- .../Utopia/Response/Model/UsageDatabase.php | 62 +- .../Utopia/Response/Model/UsageDatabases.php | 92 +- .../Utopia/Response/Model/UsageFunction.php | 50 +- .../Utopia/Response/Model/UsageFunctions.php | 47 +- .../Utopia/Response/Model/UsageProject.php | 14 +- .../Utopia/Response/Model/UsageStorage.php | 66 +- .../Utopia/Response/Model/UsageUsers.php | 47 +- .../Utopia/Response/Model/Variable.php | 12 +- src/Appwrite/Vcs/Comment.php | 126 ++ src/Executor/Executor.php | 112 +- tests/e2e/General/UsageTest.php | 1517 +++++++------- tests/e2e/Scopes/ProjectCustom.php | 15 + tests/e2e/Services/Account/AccountBase.php | 2 +- .../Account/AccountConsoleClientTest.php | 81 - .../Account/AccountCustomClientTest.php | 27 +- tests/e2e/Services/Avatars/AvatarsBase.php | 28 +- .../Console/ConsoleConsoleClientTest.php | 7 +- .../e2e/Services/Databases/DatabasesBase.php | 127 +- .../Databases/DatabasesConsoleClientTest.php | 77 +- .../Databases/DatabasesCustomClientTest.php | 416 ++++ .../Databases/DatabasesCustomServerTest.php | 104 + .../DatabasesPermissionsTeamTest.php | 2 +- .../Functions/FunctionsConsoleClientTest.php | 23 +- .../Functions/FunctionsCustomClientTest.php | 164 +- .../Functions/FunctionsCustomServerTest.php | 778 ++----- tests/e2e/Services/GraphQL/Base.php | 47 +- .../Services/GraphQL/FunctionsClientTest.php | 42 +- .../Services/GraphQL/FunctionsServerTest.php | 91 +- .../e2e/Services/GraphQL/TeamsServerTest.php | 4 +- .../Projects/ProjectsConsoleClientTest.php | 270 +-- .../Realtime/RealtimeConsoleClientTest.php | 2 +- .../Realtime/RealtimeCustomClientTest.php | 20 +- tests/e2e/Services/Storage/StorageBase.php | 53 +- .../Storage/StorageConsoleClientTest.php | 15 +- .../Services/Users/UsersConsoleClientTest.php | 43 +- .../Webhooks/WebhooksCustomServerTest.php | 10 +- tests/resources/docker/docker-compose.yml | 1 + tests/resources/functions/dart/main.dart | 40 +- tests/resources/functions/node/index.js | 42 +- tests/resources/functions/php-fn/index.php | 31 +- tests/resources/functions/php-large/index.php | 18 +- tests/resources/functions/php/index.php | 18 +- tests/resources/functions/python/main.py | 41 +- tests/resources/functions/ruby/main.rb | 42 +- tests/resources/functions/timeout/index.php | 5 +- tests/unit/Migration/MigrationTest.php | 88 - tests/unit/Usage/StatsTest.php | 79 +- tests/unit/Utopia/Request/Filters/V16Test.php | 51 + .../unit/Utopia/Response/Filters/V16Test.php | 228 +++ 3359 files changed, 64705 insertions(+), 6301 deletions(-) delete mode 100644 app/config/cloud/contributors.json delete mode 100644 app/config/cloud/employees.json delete mode 100644 app/config/cloud/heroes.json create mode 100644 app/config/locale/templates/email-inner-base.tpl create mode 100644 app/controllers/api/migrations.php create mode 100644 app/controllers/api/proxy.php create mode 100644 app/controllers/api/vcs.php create mode 100644 app/workers/migrations.php delete mode 100644 app/workers/usage.php create mode 100755 bin/upgrade create mode 100644 bin/usage create mode 100644 bin/worker-migrations delete mode 100644 bin/worker-usage create mode 100644 docs/examples/1.4.x/client-android/java/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-android/java/account/create.md create mode 100644 docs/examples/1.4.x/client-android/java/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-android/java/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-android/java/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-android/java/account/get-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/get.md create mode 100644 docs/examples/1.4.x/client-android/java/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-android/java/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-android/java/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-email.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-name.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-password.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-session.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-status.md create mode 100644 docs/examples/1.4.x/client-android/java/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-android/java/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-android/java/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-android/java/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-android/java/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-android/java/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-android/java/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-android/java/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-android/java/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-android/java/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-android/java/graphql/mutation.md create mode 100644 docs/examples/1.4.x/client-android/java/graphql/query.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/get.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-android/java/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-android/java/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/create.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/delete.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/get.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/list.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-android/java/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/create.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/get-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/get.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-email.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-name.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-password.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-session.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-status.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/graphql/mutation.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/graphql/query.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/get.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/create.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/delete.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/get.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/list.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-android/kotlin/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/create.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/get.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/client-apple/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-apple/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-apple/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-apple/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-apple/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-apple/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-apple/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-apple/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-apple/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-apple/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-apple/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/client-apple/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/get.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-apple/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-apple/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/create.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/get.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/list.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-apple/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/create.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/get.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/get.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/create.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/get.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/list.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-flutter/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/create.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/get.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/get.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/create.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/get.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/list.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-graphql/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/create.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/get.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/client-rest/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-rest/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-rest/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-rest/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-rest/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-rest/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-rest/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-rest/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-rest/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-rest/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-rest/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/client-rest/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/get.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-rest/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-rest/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/create.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/get.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/list.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-rest/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/create.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/get.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/client-web/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/client-web/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/client-web/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/client-web/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/client-web/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/client-web/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/client-web/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/client-web/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/client-web/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/client-web/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/client-web/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/client-web/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/get.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/client-web/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/client-web/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/create.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/get.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/list.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/client-web/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/create.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/console-cli/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/assistant/chat.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/console-cli/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/console-cli/examples/console/variables.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/create.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-collection-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-database-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-collection-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-document-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/list.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/console-cli/examples/databases/update.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/create.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/get-function-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/get-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/list.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/functions/update.md create mode 100644 docs/examples/1.4.x/console-cli/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/console-cli/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/console-cli/examples/health/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/console-cli/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/create-appwrite-migration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-migration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-o-auth-migration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/create-n-host-migration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/create-supabase-migration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/delete-firebase-auth.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/delete.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/get-appwrite-report.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report-o-auth.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/get-n-host-report.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/get-supabase-report.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/list-firebase-projects.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/list.md create mode 100644 docs/examples/1.4.x/console-cli/examples/migrations/retry.md create mode 100644 docs/examples/1.4.x/console-cli/examples/project/create-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/project/delete-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/project/get-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/project/get-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/project/list-variables.md create mode 100644 docs/examples/1.4.x/console-cli/examples/project/update-variable.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/create-key.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/create-platform.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/create-webhook.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/create.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/delete-email-template.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/delete-key.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/delete-platform.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/delete-sms-template.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/delete-webhook.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/delete.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get-email-template.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get-key.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get-platform.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get-sms-template.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get-webhook.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/list-keys.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/list-platforms.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/list-webhooks.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/list.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-auth-duration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-auth-limit.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-dictionary.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-history.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-auth-sessions-limit.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-auth-status.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-email-template.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-key.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-o-auth2.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-personal-data-check.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-platform.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-service-status-all.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-service-status.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-sms-template.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-smtp-configuration.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-team.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-webhook-signature.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update-webhook.md create mode 100644 docs/examples/1.4.x/console-cli/examples/projects/update.md create mode 100644 docs/examples/1.4.x/console-cli/examples/proxy/create-rule.md create mode 100644 docs/examples/1.4.x/console-cli/examples/proxy/delete-rule.md create mode 100644 docs/examples/1.4.x/console-cli/examples/proxy/get-rule.md create mode 100644 docs/examples/1.4.x/console-cli/examples/proxy/list-rules.md create mode 100644 docs/examples/1.4.x/console-cli/examples/proxy/update-rule-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-bucket-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/get-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/console-cli/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/create.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/list-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/list.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/console-cli/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/create.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/delete.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/get-usage.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/get.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/list.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/console-cli/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/create-repository-detection.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/create-repository.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/delete-installation.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/get-installation.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/get-repository.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/list-installations.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/list-repositories.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/list-repository-branches.md create mode 100644 docs/examples/1.4.x/console-cli/examples/vcs/update-external-deployments.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-email-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-phone-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/create.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-phone-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/console-web/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/assistant/chat.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/console-web/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/console-web/examples/console/variables.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/create.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-collection-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-database-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-collection-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-document-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/list.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/console-web/examples/databases/update.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/create.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/get-function-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/get-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/list.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/functions/update.md create mode 100644 docs/examples/1.4.x/console-web/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/console-web/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/console-web/examples/health/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/console-web/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/create-appwrite-migration.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/create-firebase-migration.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/create-firebase-o-auth-migration.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/create-n-host-migration.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/create-supabase-migration.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/delete-firebase-auth.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/delete.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/get-appwrite-report.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report-o-auth.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/get-n-host-report.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/get-supabase-report.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/list-firebase-projects.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/list.md create mode 100644 docs/examples/1.4.x/console-web/examples/migrations/retry.md create mode 100644 docs/examples/1.4.x/console-web/examples/project/create-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/project/delete-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/project/get-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/project/get-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/project/list-variables.md create mode 100644 docs/examples/1.4.x/console-web/examples/project/update-variable.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/create-key.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/create-platform.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/create-webhook.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/create.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/delete-email-template.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/delete-key.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/delete-platform.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/delete-sms-template.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/delete-webhook.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/delete.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get-email-template.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get-key.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get-platform.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get-sms-template.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get-webhook.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/list-keys.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/list-platforms.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/list-webhooks.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/list.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-auth-duration.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-auth-limit.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-auth-password-dictionary.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-auth-password-history.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-auth-sessions-limit.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-auth-status.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-email-template.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-key.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-o-auth2.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-personal-data-check.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-platform.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-service-status-all.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-service-status.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-sms-template.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-smtp-configuration.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-team.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-webhook-signature.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update-webhook.md create mode 100644 docs/examples/1.4.x/console-web/examples/projects/update.md create mode 100644 docs/examples/1.4.x/console-web/examples/proxy/create-rule.md create mode 100644 docs/examples/1.4.x/console-web/examples/proxy/delete-rule.md create mode 100644 docs/examples/1.4.x/console-web/examples/proxy/get-rule.md create mode 100644 docs/examples/1.4.x/console-web/examples/proxy/list-rules.md create mode 100644 docs/examples/1.4.x/console-web/examples/proxy/update-rule-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-bucket-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/get-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/console-web/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/create.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/list-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/list.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/console-web/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/create.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/delete.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/get-usage.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/get.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/list.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/console-web/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/create-repository-detection.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/create-repository.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/delete-installation.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/get-installation.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/get-repository.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/list-installations.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/list-repositories.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/list-repository-branches.md create mode 100644 docs/examples/1.4.x/console-web/examples/vcs/update-external-deployments.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-dart/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-dart/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-dart/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-dart/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-dart/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-dart/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-dart/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-dart/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-dart/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-dart/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-dart/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-deno/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-deno/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-deno/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-deno/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-deno/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-deno/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-deno/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-deno/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-deno/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-deno/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-deno/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-dotnet/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-graphql/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/get-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-email.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-name.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-password.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-status.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/databases/update.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/functions/update.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/graphql/query.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get-time.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/health/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-email.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-name.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-password.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/java/users/update-status.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/get-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-email.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-name.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-password.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-status.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/databases/update.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/functions/update.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/graphql/query.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get-time.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/health/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/create.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/delete.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/get.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/list.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-email.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-name.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-password.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-kotlin/kotlin/users/update-status.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-nodejs/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-php/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-php/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-php/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-php/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-php/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-php/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-php/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-php/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-php/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-php/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-php/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-python/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-python/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-python/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-python/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-python/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-python/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-python/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-python/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-python/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-python/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-python/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-rest/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-rest/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-rest/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-rest/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-rest/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-rest/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-rest/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-rest/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-rest/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-rest/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-rest/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-ruby/examples/users/update-status.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/create-recovery.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/create-verification.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/delete-identity.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/delete-session.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/get-prefs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/get-session.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/list-identities.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/list-logs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/list-sessions.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-email.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-name.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-password.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-phone.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-prefs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-recovery.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-session.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-status.md create mode 100644 docs/examples/1.4.x/server-swift/examples/account/update-verification.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-browser.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-flag.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-image.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-initials.md create mode 100644 docs/examples/1.4.x/server-swift/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-collection.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-document.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-index.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/create.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/delete-collection.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/delete-document.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/delete-index.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/delete.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/get-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/get-collection.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/get-document.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/get-index.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/list-attributes.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/list-collections.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/list-documents.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/list-indexes.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/list.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-collection.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-document.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.4.x/server-swift/examples/databases/update.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/create-build.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/create-deployment.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/create-execution.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/create-variable.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/create.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/delete-variable.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/delete.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/download-deployment.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/get-deployment.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/get-execution.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/get-variable.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/list-deployments.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/list-executions.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/list-variables.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/list.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/update-deployment.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/update-variable.md create mode 100644 docs/examples/1.4.x/server-swift/examples/functions/update.md create mode 100644 docs/examples/1.4.x/server-swift/examples/graphql/mutation.md create mode 100644 docs/examples/1.4.x/server-swift/examples/graphql/query.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-antivirus.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-cache.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-d-b.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-queue.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-storage-local.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get-time.md create mode 100644 docs/examples/1.4.x/server-swift/examples/health/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-codes.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-continents.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-countries.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-currencies.md create mode 100644 docs/examples/1.4.x/server-swift/examples/locale/list-languages.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/create-bucket.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/create-file.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/delete-file.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/get-bucket.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/get-file-download.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/get-file-view.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/get-file.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/list-buckets.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/list-files.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/update-bucket.md create mode 100644 docs/examples/1.4.x/server-swift/examples/storage/update-file.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/create-membership.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/create.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/delete-membership.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/delete.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/get-membership.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/get-prefs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/list-memberships.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/list.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/update-membership.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/update-name.md create mode 100644 docs/examples/1.4.x/server-swift/examples/teams/update-prefs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-argon2user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/create.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/delete-identity.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/delete-session.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/delete-sessions.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/delete.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/get-prefs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/get.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/list-identities.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/list-logs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/list-memberships.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/list-sessions.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/list.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-email-verification.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-email.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-labels.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-name.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-password.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-phone.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-prefs.md create mode 100644 docs/examples/1.4.x/server-swift/examples/users/update-status.md create mode 100644 docs/references/account/delete-identity.md create mode 100644 docs/references/account/list-identities.md create mode 100644 docs/references/functions/create-build.md create mode 100644 docs/references/project/create-variable.md create mode 100644 docs/references/project/delete-variable.md create mode 100644 docs/references/project/get-variable.md create mode 100644 docs/references/project/list-variables.md create mode 100644 docs/references/project/update-variable.md create mode 100644 docs/references/proxy/create-rule.md create mode 100644 docs/references/proxy/delete-rule.md create mode 100644 docs/references/proxy/get-rule.md create mode 100644 docs/references/proxy/list-rules.md rename docs/references/teams/{update-team-membership-roles.md => update-team-membership.md} (78%) create mode 100644 docs/references/users/delete-identity.md create mode 100644 docs/references/users/list-identities.md create mode 100644 docs/services/proxy.md create mode 100644 docs/services/vcs.md create mode 100644 src/Appwrite/Auth/OAuth2/Firebase.php create mode 100644 src/Appwrite/Event/Migration.php create mode 100644 src/Appwrite/Platform/Tasks/Upgrade.php create mode 100644 src/Appwrite/Platform/Tasks/Usage.php create mode 100644 src/Appwrite/Usage/Calculator.php create mode 100644 src/Appwrite/Usage/Calculators/TimeSeries.php create mode 100644 src/Appwrite/Usage/Stats.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Identities.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Installations.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Migrations.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Rules.php create mode 100644 src/Appwrite/Utopia/Request/Filters/V16.php create mode 100644 src/Appwrite/Utopia/Response/Filters/V16.php create mode 100644 src/Appwrite/Utopia/Response/Model/Branch.php create mode 100644 src/Appwrite/Utopia/Response/Model/Detection.php delete mode 100644 src/Appwrite/Utopia/Response/Model/Domain.php create mode 100644 src/Appwrite/Utopia/Response/Model/Headers.php create mode 100644 src/Appwrite/Utopia/Response/Model/Identity.php create mode 100644 src/Appwrite/Utopia/Response/Model/Installation.php create mode 100644 src/Appwrite/Utopia/Response/Model/Migration.php create mode 100644 src/Appwrite/Utopia/Response/Model/MigrationFirebaseProject.php create mode 100644 src/Appwrite/Utopia/Response/Model/MigrationReport.php create mode 100644 src/Appwrite/Utopia/Response/Model/ProviderRepository.php create mode 100644 src/Appwrite/Utopia/Response/Model/Rule.php create mode 100644 src/Appwrite/Vcs/Comment.php create mode 100644 tests/unit/Utopia/Request/Filters/V16Test.php create mode 100644 tests/unit/Utopia/Response/Filters/V16Test.php diff --git a/.env b/.env index 8b266abccf..6ef35b57c1 100644 --- a/.env +++ b/.env @@ -1,12 +1,9 @@ _APP_ENV=development _APP_LOCALE=en -_APP_WORKER_PER_CORE=2 +_APP_WORKER_PER_CORE=6 _APP_CONSOLE_WHITELIST_ROOT=disabled _APP_CONSOLE_WHITELIST_EMAILS= -_APP_CONSOLE_WHITELIST_CODES=code-zero,code-one _APP_CONSOLE_WHITELIST_IPS= -_APP_CONSOLE_INVITES=enabled -_APP_CONSOLE_ROOT_SESSION=disabled _APP_SYSTEM_EMAIL_NAME=Appwrite _APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io @@ -14,8 +11,9 @@ _APP_SYSTEM_RESPONSE_FORMAT= _APP_OPTIONS_ABUSE=disabled _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key -_APP_DOMAIN=demo.appwrite.io -_APP_DOMAIN_TARGET=demo.appwrite.io +_APP_DOMAIN=localhost +_APP_DOMAIN_FUNCTIONS=functions.localhost +_APP_DOMAIN_TARGET=localhost _APP_REDIS_HOST=redis _APP_REDIS_PORT=6379 _APP_REDIS_PASS= @@ -26,26 +24,39 @@ _APP_DB_SCHEMA=appwrite _APP_DB_USER=user _APP_DB_PASS=password _APP_DB_ROOT_PASS=rootsecretpassword -_APP_CONNECTIONS_MAX=3100 -_APP_POOL_CLIENTS=14 -_APP_CONNECTIONS_DB_PROJECT=db_fra1_02=mariadb://user:password@mariadb:3306/appwrite -_APP_CONNECTIONS_DB_CONSOLE=db_fra1_01=mariadb://user:password@mariadb:3306/appwrite -_APP_CONNECTIONS_CACHE=redis_fra1_01=redis://redis:6379 -_APP_CONNECTIONS_QUEUE=redis_fra1_01=redis://redis:6379 -_APP_CONNECTIONS_PUBSUB=redis_fra1_01=redis://redis:6379 -_APP_CONNECTIONS_STORAGE=local://localhost +_APP_STORAGE_DEVICE=Local +_APP_STORAGE_S3_ACCESS_KEY= +_APP_STORAGE_S3_SECRET= +_APP_STORAGE_S3_REGION=us-east-1 +_APP_STORAGE_S3_BUCKET= +_APP_STORAGE_DO_SPACES_ACCESS_KEY= +_APP_STORAGE_DO_SPACES_SECRET= +_APP_STORAGE_DO_SPACES_REGION=us-east-1 +_APP_STORAGE_DO_SPACES_BUCKET= +_APP_STORAGE_BACKBLAZE_ACCESS_KEY= +_APP_STORAGE_BACKBLAZE_SECRET= +_APP_STORAGE_BACKBLAZE_REGION=us-west-004 +_APP_STORAGE_BACKBLAZE_BUCKET= +_APP_STORAGE_LINODE_ACCESS_KEY= +_APP_STORAGE_LINODE_SECRET= +_APP_STORAGE_LINODE_REGION=eu-central-1 +_APP_STORAGE_LINODE_BUCKET= +_APP_STORAGE_WASABI_ACCESS_KEY= +_APP_STORAGE_WASABI_SECRET= +_APP_STORAGE_WASABI_REGION=eu-central-1 +_APP_STORAGE_WASABI_BUCKET= _APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_PORT=3310 +_APP_INFLUXDB_HOST=influxdb +_APP_INFLUXDB_PORT=8086 +_APP_STATSD_HOST=telegraf +_APP_STATSD_PORT=8125 _APP_SMTP_HOST=maildev _APP_SMTP_PORT=1025 _APP_SMTP_SECURE= _APP_SMTP_USERNAME= _APP_SMTP_PASSWORD= -_APP_USERS_STATS_RECIPIENTS= -_APP_HAMSTER_INTERVAL=86400 -_APP_HAMSTER_TIME=21:00 -_APP_MIXPANEL_TOKEN= _APP_SMS_PROVIDER=sms://username:password@mock _APP_SMS_FROM=+123456789 _APP_STORAGE_LIMIT=30000000 @@ -54,30 +65,35 @@ _APP_FUNCTIONS_SIZE_LIMIT=30000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_BUILD_TIMEOUT=900 _APP_FUNCTIONS_CPUS=1 -_APP_FUNCTIONS_MEMORY=512 +_APP_FUNCTIONS_MEMORY=1024 _APP_FUNCTIONS_INACTIVE_THRESHOLD=600 _APP_FUNCTIONS_MAINTENANCE_INTERVAL=600 _APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes _APP_EXECUTOR_SECRET=your-secret-key -_APP_EXECUTOR_HOST=http://exc1/v1 +_APP_EXECUTOR_HOST=http://proxy/v1 _APP_FUNCTIONS_RUNTIMES= _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_CACHE=2592000 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 _APP_MAINTENANCE_RETENTION_AUDIT=1209600 -_APP_MAINTENANCE_RETENTION_SCHEDULES=86400 +_APP_USAGE_AGGREGATION_INTERVAL=5 _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000 +_APP_MAINTENANCE_RETENTION_SCHEDULES=86400 _APP_USAGE_STATS=enabled -_APP_USAGE_AGGREGATION_INTERVAL=30 _APP_LOGGING_PROVIDER= _APP_LOGGING_CONFIG= _APP_GRAPHQL_MAX_BATCH_SIZE=10 _APP_GRAPHQL_MAX_COMPLEXITY=250 _APP_GRAPHQL_MAX_DEPTH=3 -_APP_REGION=default _APP_DOCKER_HUB_USERNAME= _APP_DOCKER_HUB_PASSWORD= -_APP_CONSOLE_GITHUB_SECRET= -_APP_CONSOLE_GITHUB_APP_ID= -OPENAI_API_KEY=YOUR_OPENAI_API_KEY \ No newline at end of file +_APP_VCS_GITHUB_APP_NAME= +_APP_VCS_GITHUB_PRIVATE_KEY="" +_APP_VCS_GITHUB_APP_ID= +_APP_VCS_GITHUB_CLIENT_ID= +_APP_VCS_GITHUB_CLIENT_SECRET= +_APP_VCS_GITHUB_WEBHOOK_SECRET= +_APP_MIGRATIONS_FIREBASE_CLIENT_ID= +_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET= +_APP_ASSISTANT_OPENAI_API_KEY= \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3fdf1e2d3..8fb3ac3518 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,9 @@ jobs: sleep 30 - name: Doctor - run: docker compose exec -T appwrite doctor + run: | + docker compose logs appwrite + docker compose exec -T appwrite doctor - name: Environment Variables run: docker compose exec -T appwrite vars diff --git a/.gitmodules b/.gitmodules index 92afa7ada7..a4726398ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "app/console"] path = app/console url = https://github.com/appwrite/console - branch = disallow-personal-data + branch = 3.0.2 diff --git a/CHANGES.md b/CHANGES.md index 864fc04012..2d9af087db 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,19 @@ +# Version 1.4.1 + +## Features + +- Add upgrade task [#6068](https://github.com/appwrite/appwrite/pull/6068) + +## Fixes + +- Fix VCS/migration/assistant scopes [#6071](https://github.com/appwrite/appwrite/pull/6071) +- Add missing parameters required for custom email templates [#6077](https://github.com/appwrite/appwrite/pull/6077) +- Fix `Call to a member function label() on null` error when using a custom domain [#6079](https://github.com/appwrite/appwrite/pull/6079) + +## Changes + +- Update console to 3.0.2 [#6071](https://github.com/appwrite/appwrite/pull/6071) + # Version 1.4.0 ## Features @@ -121,41 +137,6 @@ - Get default region from environment on project create [#4780](https://github.com/appwrite/appwrite/pull/4780) - Fix french translation [#4782](https://github.com/appwrite/appwrite/pull/4782) - Fix max mimetype size [#4814](https://github.com/appwrite/appwrite/pull/4814) -- New usage metrics collection flow [#4770](https://github.com/appwrite/appwrite/pull/4770) - - Deprecated influxdb, telegraf containers and removed all of their occurrences from the code. - - Removed _APP_INFLUXDB_HOST, _APP_INFLUXDB_PORT, _APP_STATSD_HOST, _APP_STATSD_PORT env variables. - - Removed usage labels dependency. - - Dropped type attribute from stats collection. - - Usage metrics are processed via new usage worker. - - Metrics changes: - - Storage - - deprecated - - filesCreate, filesRead, filesUpdate, filesDelete, bucketsCreate, bucketsRead, bucketsUpdate, bucketsDelete. - - renamed - - filesCount to filesTotal, storage to filesStorage, bucketsCount to bucketsTotal. - - Auth - - deprecated - - usersCreate, usersRead, usersUpdate, usersDelete, sessionsCreate sessionsProviderCreate, sessionsDelete. - - renamed - - usersCount to usersTotal. - - added - - sessionsTotal. - - Databases - - deprecated - - databasesCreate, databasesRead, databasesDelete, documentsCreate, documentsRead, documentsUpdate, documentsDelete, collectionsCreate, collectionsRead, collectionsUpdate, collectionsDelete. - - renamed - - databasesCount to databasesTotal, collectionsCount to collectionsTotal, documentsCount to documentsTotal. - - Functions - - deprecated - - executionsFailure, executionsSuccess, buildsFailure, buildsSuccess, executionsFailure, executionsSuccess. - - renamed - - executionsTime to executionsCompute, buildsTime to buildsCompute, documentsCount to documentsTotal. - - added - - functionsTotal, buildsStorage, deploymentsTotal, deploymentsStorage. - - Project - - renamed - - executions to executionsTotal, builds to buildsTotal, requests to requestsTotal, storage to filesStorage, buckets to bucketsTotal, users to usersTotal, documents to documentsTotal, collections to collectionsTotal, databases to databasesTotal. - ## Bugs - Fix invited account verified status [#4776](https://github.com/appwrite/appwrite/pull/4776) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83e14d8c31..1341c9f133 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,7 +109,9 @@ docker run --rm --interactive --tty \ ### User Interface -Appwrite uses an internal micro-framework called Litespeed.js to build simple UI components in vanilla JS and [less](http://lesscss.org/) for compiling CSS code. To apply any of your changes to the UI, use the `gulp build` or `gulp less` commands, and restart the Appwrite main container to load the new static files to memory using `docker compose restart appwrite`. +Appwrite's UI is built with [Svelte](https://svelte.dev/), [Svelte Kit](https://kit.svelte.dev/), and the [Pink Design](https://github.com/appwrite/pink) component library. You can find the source code in the [Appwrite Console](https://github.com/appwrite/console) repository. + +To contribute to the UI, head to the [Contribution Guide](https://github.com/appwrite/console/blob/main/CONTRIBUTING.md) of Appwrite Console. ### Get Started @@ -238,6 +240,8 @@ Appwrite stack is a combination of a variety of open-source technologies and too - Redis - for managing cache and in-memory data (currently, we do not use Redis for persistent data). - MariaDB - for database storage and queries. +- InfluxDB - for managing stats and time-series based data +- Statsd - for sending data over UDP protocol (using Telegraf) - ClamAV - for validating and scanning storage files. - Imagemagick - for manipulating and managing image media files. - Webp - for better compression of images on supporting clients. diff --git a/Dockerfile b/Dockerfile index 37659cafa1..23bd3f188f 100755 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT RUN npm ci RUN npm run build -FROM appwrite/base:0.4.2 as final +FROM appwrite/base:0.4.3 as final LABEL maintainer="team@appwrite.io" @@ -43,14 +43,15 @@ ENV DOCKER_COMPOSE_VERSION=v2.5.0 ENV _APP_SERVER=swoole \ _APP_ENV=production \ _APP_LOCALE=en \ + _APP_WORKER_PER_CORE= \ _APP_DOMAIN=localhost \ + _APP_DOMAIN_FUNCTIONS=functions.localhost \ _APP_DOMAIN_TARGET=localhost \ _APP_HOME=https://appwrite.io \ _APP_EDITION=community \ _APP_CONSOLE_WHITELIST_ROOT=enabled \ _APP_CONSOLE_WHITELIST_EMAILS= \ _APP_CONSOLE_WHITELIST_IPS= \ - _APP_CONSOLE_ROOT_SESSION= \ _APP_SYSTEM_EMAIL_NAME= \ _APP_SYSTEM_EMAIL_ADDRESS= \ _APP_SYSTEM_RESPONSE_FORMAT= \ @@ -62,6 +63,27 @@ ENV _APP_SERVER=swoole \ _APP_STORAGE_ANTIVIRUS=enabled \ _APP_STORAGE_ANTIVIRUS_HOST=clamav \ _APP_STORAGE_ANTIVIRUS_PORT=3310 \ + _APP_STORAGE_DEVICE=Local \ + _APP_STORAGE_S3_ACCESS_KEY= \ + _APP_STORAGE_S3_SECRET= \ + _APP_STORAGE_S3_REGION= \ + _APP_STORAGE_S3_BUCKET= \ + _APP_STORAGE_DO_SPACES_ACCESS_KEY= \ + _APP_STORAGE_DO_SPACES_SECRET= \ + _APP_STORAGE_DO_SPACES_REGION= \ + _APP_STORAGE_DO_SPACES_BUCKET= \ + _APP_STORAGE_BACKBLAZE_ACCESS_KEY= \ + _APP_STORAGE_BACKBLAZE_SECRET= \ + _APP_STORAGE_BACKBLAZE_REGION= \ + _APP_STORAGE_BACKBLAZE_BUCKET= \ + _APP_STORAGE_LINODE_ACCESS_KEY= \ + _APP_STORAGE_LINODE_SECRET= \ + _APP_STORAGE_LINODE_REGION= \ + _APP_STORAGE_LINODE_BUCKET= \ + _APP_STORAGE_WASABI_ACCESS_KEY= \ + _APP_STORAGE_WASABI_SECRET= \ + _APP_STORAGE_WASABI_REGION= \ + _APP_STORAGE_WASABI_BUCKET= \ _APP_REDIS_HOST=redis \ _APP_REDIS_PORT=6379 \ _APP_DB_HOST=mariadb \ @@ -69,22 +91,45 @@ ENV _APP_SERVER=swoole \ _APP_DB_USER=root \ _APP_DB_PASS=password \ _APP_DB_SCHEMA=appwrite \ + _APP_INFLUXDB_HOST=influxdb \ + _APP_INFLUXDB_PORT=8086 \ + _APP_STATSD_HOST=telegraf \ + _APP_STATSD_PORT=8125 \ + _APP_SMTP_HOST= \ + _APP_SMTP_PORT= \ + _APP_SMTP_SECURE= \ + _APP_SMTP_USERNAME= \ + _APP_SMTP_PASSWORD= \ + _APP_SMS_PROVIDER= \ + _APP_SMS_FROM= \ _APP_FUNCTIONS_SIZE_LIMIT=30000000 \ _APP_FUNCTIONS_TIMEOUT=900 \ + _APP_FUNCTIONS_CONTAINERS=10 \ _APP_FUNCTIONS_CPUS=1 \ _APP_FUNCTIONS_MEMORY=128 \ + _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_EXECUTOR_SECRET=a-random-secret \ - _APP_EXECUTOR_HOST=http://exc1/v1 \ + _APP_EXECUTOR_HOST=http://appwrite-executor/v1 \ + _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ _APP_USAGE_STATS=enabled \ + _APP_USAGE_AGGREGATION_INTERVAL=30 \ # 14 Days = 1209600 s _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 \ _APP_MAINTENANCE_RETENTION_AUDIT=1209600 \ # 1 Day = 86400 s _APP_MAINTENANCE_RETENTION_ABUSE=86400 \ _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000 \ - _APP_MAINTENANCE_INTERVAL=86400 + _APP_MAINTENANCE_INTERVAL=86400 \ + _APP_LOGGING_PROVIDER= \ + _APP_LOGGING_CONFIG= \ + _APP_VCS_GITHUB_APP_NAME= \ + _APP_VCS_GITHUB_PRIVATE_KEY= \ + _APP_VCS_GITHUB_APP_ID= \ + _APP_VCS_GITHUB_CLIENT_ID= \ + _APP_VCS_GITHUB_CLIENT_SECRET= \ + _APP_VCS_GITHUB_WEBHOOK_SECRET= RUN \ if [ "$DEBUG" == "true" ]; then \ @@ -119,21 +164,16 @@ RUN mkdir -p /storage/uploads && \ # Executables RUN chmod +x /usr/local/bin/doctor && \ - chmod +x /usr/local/bin/patch-delete-schedule-updated-at-attribute && \ - chmod +x /usr/local/bin/clear-card-cache && \ - chmod +x /usr/local/bin/calc-users-stats && \ - chmod +x /usr/local/bin/calc-tier-stats && \ - chmod +x /usr/local/bin/patch-delete-project-collections && \ chmod +x /usr/local/bin/maintenance && \ - chmod +x /usr/local/bin/volume-sync && \ + chmod +x /usr/local/bin/usage && \ chmod +x /usr/local/bin/install && \ + chmod +x /usr/local/bin/upgrade && \ chmod +x /usr/local/bin/migrate && \ chmod +x /usr/local/bin/realtime && \ chmod +x /usr/local/bin/schedule && \ chmod +x /usr/local/bin/sdks && \ chmod +x /usr/local/bin/specs && \ chmod +x /usr/local/bin/ssl && \ - chmod +x /usr/local/bin/hamster && \ chmod +x /usr/local/bin/test && \ chmod +x /usr/local/bin/vars && \ chmod +x /usr/local/bin/worker-audits && \ @@ -145,7 +185,16 @@ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/worker-mails && \ chmod +x /usr/local/bin/worker-messaging && \ chmod +x /usr/local/bin/worker-webhooks && \ - chmod +x /usr/local/bin/worker-usage + chmod +x /usr/local/bin/worker-migrations + +# Cloud Executabless +RUN chmod +x /usr/local/bin/hamster && \ + chmod +x /usr/local/bin/volume-sync && \ + chmod +x /usr/local/bin/patch-delete-schedule-updated-at-attribute && \ + chmod +x /usr/local/bin/patch-delete-project-collections && \ + chmod +x /usr/local/bin/clear-card-cache && \ + chmod +x /usr/local/bin/calc-users-stats && \ + chmod +x /usr/local/bin/calc-tier-stats # Letsencrypt Permissions RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ diff --git a/README-CN.md b/README-CN.md index b634458547..f960943477 100644 --- a/README-CN.md +++ b/README-CN.md @@ -66,7 +66,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.8 + appwrite/appwrite:1.4.1 ``` ### Windows @@ -78,7 +78,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.8 + appwrite/appwrite:1.4.1 ``` #### PowerShell @@ -88,7 +88,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.8 + appwrite/appwrite:1.4.1 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index 2b82d49eb0..b205b18d8a 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.8 + appwrite/appwrite:1.4.1 ``` ### Windows @@ -87,7 +87,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.8 + appwrite/appwrite:1.4.1 ``` #### PowerShell @@ -97,7 +97,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.8 + appwrite/appwrite:1.4.1 ``` Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation. @@ -131,7 +131,7 @@ Choose from one of the providers below: Akamai Logo -
Akamai
+
Akamai Compute diff --git a/SECURITY.md b/SECURITY.md index bc85b354d8..a0591d7745 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,6 +9,7 @@ | 1.1.x | :white_check_mark: | | 1.2.x | :white_check_mark: | | 1.3.x | :white_check_mark: | +| 1.4.x | :white_check_mark: | ## Reporting a Vulnerability diff --git a/app/cli.php b/app/cli.php index d1dd885775..c8ebd089b1 100644 --- a/app/cli.php +++ b/app/cli.php @@ -58,7 +58,7 @@ CLI::setResource('dbForConsole', function ($pools, $cache) { ->getResource(); $dbForConsole = new Database($dbAdapter, $cache); - $dbForConsole->setNamespace('console'); + $dbForConsole->setNamespace('_console'); // Ensure tables exist $collections = Config::getParam('collections', [])['console']; @@ -74,7 +74,7 @@ CLI::setResource('dbForConsole', function ($pools, $cache) { $pools->get('console')->reclaim(); sleep($sleep); } - } while ($attempts < $maxAttempts); + } while ($attempts < $maxAttempts && !$ready); if (!$ready) { throw new Exception("Console is not ready yet. Please try again later."); @@ -116,6 +116,29 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole, return $getProjectDB; }, ['pools', 'dbForConsole', 'cache']); +CLI::setResource('influxdb', function (Registry $register) { + $client = $register->get('influxdb'); /** @var InfluxDB\Client $client */ + $attempts = 0; + $max = 10; + $sleep = 1; + + do { // check if telegraf database is ready + try { + $attempts++; + $database = $client->selectDB('telegraf'); + if (in_array('telegraf', $client->listDatabases())) { + break; // leave the do-while if successful + } + } catch (\Throwable $th) { + Console::warning("InfluxDB not ready. Retrying connection ({$attempts})..."); + if ($attempts >= $max) { + throw new \Exception('InfluxDB database not ready yet'); + } + sleep($sleep); + } + } while ($attempts < $max); + return $database; +}, ['register']); CLI::setResource('queueForFunctions', function (Group $pools) { return new Func($pools->get('queue')->pop()->getResource()); diff --git a/app/config/cloud/contributors.json b/app/config/cloud/contributors.json deleted file mode 100644 index efa36c3cb2..0000000000 --- a/app/config/cloud/contributors.json +++ /dev/null @@ -1 +0,0 @@ -[1297371,1759475,6360216,20852629,5857008,19310830,9708641,26739219,23742426,22174310,77877486,1477010,29069505,62933155,45863583,42211,176163,58045728,7091609,31401437,1911066,66096031,22432834,43054051,79051850,22895284,100597998,91385411,49699333,7818620,11004008,54898623,27856297,33250853,49375670,30630364,50206,47822499,7481165,52557347,13681567,20492520,51369094,51821861,50256986,28431370,13692220,24373771,15938422,27148250,14805534,36137226,36071208,40193621,56179878,53281158,48085134,19358691,32528768,19733683,37348419,13719696,18309412,42106787,53618500,5306011,4408379,35486736,18586611,15062564,27011453,56090587,44623032,25107942,81188,33922418,16717633,32809211,69401139,25815659,4104127,20889958,3102249,12476526,2635185,28495651,50957556,2791280,31023616,20955511,835733,471907,69008866,44906587,45271396,76054330,45748739,41908747,23402178,47356149,8921,36632821,3668741,71702982,29725587,26303198,785830,51410502,60089135,2847349,43172716,48546075,8216525,41161981,51828039,4334997,80918302,38534289,47860497,80036766,41341387,49818988,58487637,29237374,46913894,5148229,4377199,29686102,26272249,75117692,4090256,27357868,33062368,38664231,46695441,743291,22633385,6368283,11593067,45097959,43381712,3284228,1972717,33012425,61755381,25405707,3144291,44156359,5497267,7423905,20716175,28586681,5975506,23518097,22187384,24191952,7768078,971530,51240166,55633427,34207400,77061285,11719476,35950229,66742927,34406802,802933,50047839,39148877,26602940,9693472,44273767,19362725,31209978,30521594,686298,6237394,35039730,42580581,36671793,8502129,8466918,81866614,54903252,28373606,13381361,72331432,30694270,5355510,8209163,86675510,9453522,42496309,56145786,2149381,393945,22084723,52621436,8872447,5575392,29619660,5547479,8852116,11151445,4717349,17725274,65615065,18537755,29292618,53044263,26597930,10313411,55998629,77529288,17404636,33729848,19422168,17916404,66111735,10329006,33502846,398230,81643826,105039167,47522632,91655303,9774614,10603631,284924,60857954,22885912,116552306,36103454,794606,27729549,1754457,36594527,13899668,78664749,47406531,27698189,5305654,53345517,6756412,29176704,77790497,47504894,37251540,52361778,52200375,1351177,66022861,73975409,25745396,31433638,37118134,43210805,20317665,11923975,47187468,16362381,36751163,14959876,32362757,65529384,52352285,74085816,3628535,43902034,75667593,26132902,466713,617558,96806061,33605526,11290524,43621940,12446314,17146935,55018955,56096559,79797000,40014186,34449936,58387964,23368207,42414965,44056349,33743031,12294525,58251592,33755729,9021747,932084,11428067,97121933,80122730,60894542,58583793,56051809,32243289,9934371,90936802,74638775,65399526,77604,64524822,47782249,43633955,42793632,55969597,72334601,82395440,92818577,60866204,65016769,23725091,45892107,55308895,86314140,82756460,47685349,63562160,73419211,1613216,50882624,91469717,46166258,60927324,41763158,83607556,2171717,50497814,39427312,61322830,40076195,39419448,29397545,55090719,53259730,20885012,64558515,69677883,55741087,72426535,46033036,68477507,30376878,73700530,25518600,29922887,36229969,47573417,40424087,49054503,16880385,22801227,72848513,64347914,814402,49149679,55017867,49481876,67067955,31439735,63878173,80322286,43746210,17332970,22702905,62476876,89888292,75736952,54059881,90782137,63588969,57111920,63330165,70258211,46371923,17837758,59364507,52203828,60147326,18481195,74822422,9803078,67309607,60410049,47360939,19922556,90848252,24698014,58886915,63579762,96648934,68523530,60518745,37345795,3929651,54993657,52061363,43019989,5787917,94674993,71593494,17143469,10288548,1830380,71510505,59124772,2335145,70798495,46474346,49263351,52062536,63151043,65248303,26071571,53626355,43992469,60785452,63467479,71837281,19490891,58628586,38250310,7271718,1110414,57227290,11625672,85063520,88965873,70096901,42029519,85363195,64471630,69353350,66922161,2221746,100430077,12299813,62690310,68282006,99184676,2450,22989561,22212661,59973863,11232940,76688923,22321353,77732479,84286404,32268377,34828782,23068019,57074509,24620969,20735983,26173690,75809937,49760818,86646105,52617262] \ No newline at end of file diff --git a/app/config/cloud/employees.json b/app/config/cloud/employees.json deleted file mode 100644 index 1575a05883..0000000000 --- a/app/config/cloud/employees.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "eldad@appwrite.io": { "memberSince": "2020-10-15", "spot": "0", "gitHub": "eldadfux" }, - "christy@appwrite.io": { "memberSince": "2020-12-01", "spot": "1", "gitHub": "christyjacob4" }, - "torsten@appwrite.io": { "memberSince": "2020-12-28", "spot": "2", "gitHub": "torstendittmann" }, - "damodar@appwrite.io": { "memberSince": "2021-01-02", "spot": "3", "gitHub": "lohanidamodar" }, - "bradley@appwrite.io": { "memberSince": "2021-05-21", "spot": "5", "gitHub": "PineappleIOnic" }, - "jake@appwrite.io": { "memberSince": "2021-06-28", "spot": "6", "gitHub": "abnegate" }, - "sara@appwrite.io": { "memberSince": "2021-08-16", "spot": "7", "gitHub": "sarakaandorp" }, - "matej@appwrite.io": { "memberSince": "2021-08-23", "spot": "8", "gitHub": "meldiron" }, - "aditya@appwrite.io": { "memberSince": "2021-09-01", "spot": "9", "gitHub": "adityaoberai" }, - "wess@appwrite.io": { "memberSince": "2021-11-08", "spot": "12", "gitHub": "wess" }, - "may@appwrite.io": { "memberSince": "2021-11-28", "spot": "14", "gitHub": "MayEnder" }, - "elad@appwrite.io": { "memberSince": "2021-12-19", "spot": "15", "gitHub": "elad2412" }, - "vincent@appwrite.io": { "memberSince": "2022-01-01", "spot": "16", "gitHub": "gewenyu99" }, - "haimantika@appwrite.io": { "memberSince": "2022-04-01", "spot": "18", "gitHub": "Haimantika" }, - "chen@appwrite.io": { "memberSince": "2022-01-24", "spot": "19", "gitHub": "chenparnasa" }, - "tessa@appwrite.io": { "memberSince": "2022-04-21", "spot": "20", "gitHub": "tessamero" }, - "shimon@appwrite.io": { "memberSince": "2022-05-01", "spot": "23", "gitHub": "shimonewman" }, - "shmuel@appwrite.io": { "memberSince": "2022-03-20", "spot": "24", "gitHub": "fogelito" }, - "arman@appwrite.io": { "memberSince": "2022-04-04", "spot": "25", "gitHub": "ArmanNik" }, - "carla@appwrite.io": { "memberSince": "2022-04-04", "spot": "26", "gitHub": "heyCarla" }, - "emma@appwrite.io": { "memberSince": "2022-05-08", "spot": "27", "gitHub": "emmacarpagnano1" }, - "dylan@appwrite.io": { "memberSince": "2022-05-09", "spot": "28", "gitHub": "DylanG-64" }, - "steven@appwrite.io": { "memberSince": "2022-07-01", "spot": "30", "gitHub": "stnguyen90" }, - "jyoti@appwrite.io": { "memberSince": "2022-10-24", "spot": "31", "gitHub": "joeyouss" }, - "jade@appwrite.io": { "memberSince": "2022-10-31", "spot": "32", "gitHub": "dajebp" }, - "khushboo@appwrite.io": { "memberSince": "2021-11-08", "spot": "13", "gitHub": "vermakhushboo" }, - "thomas@appwrite.io": { "memberSince": "2022-11-03", "spot": "34", "gitHub": "TGlide" }, - "holly@appwrite.io": { "memberSince": "2022-12-05", "spot": "35", "gitHub": "HollyBarclay" }, - "laura@appwrite.io": { "memberSince": "2023-01-25", "spot": "36", "gitHub": "LauraDuRy" }, - "caio@appwrite.io": { "memberSince": "2023-03-27", "spot": "37", "gitHub": "ariascaio" }, - "luke@appwrite.io": { "memberSince": "2023-05-04", "spot": "38", "gitHub": "loks0n" } -} diff --git a/app/config/cloud/heroes.json b/app/config/cloud/heroes.json deleted file mode 100644 index 3fc81b3b3f..0000000000 --- a/app/config/cloud/heroes.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "bishwajeet.techmaster@gmail.com": { "memberSince": "2023-02-07" }, - "lucasaudart@gmail.com": { "memberSince": "2023-02-07" }, - "tkarmakar27112000@gmail.com": { "memberSince": "2023-02-07" }, - "alves.mckl@gmail.com": { "memberSince": "2023-02-07" }, - "dpns_nampula@rnlay.com": { "memberSince": "2023-02-07" }, - "a.stephensimon@outlook.com": { "memberSince": "2023-02-07" }, - "hidianapham@gmail.com": { "memberSince": "2023-02-07" } -} diff --git a/app/config/collections.php b/app/config/collections.php index 15effbf5ae..79f1622574 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -253,7 +253,7 @@ $commonCollections = [ 'default' => null, 'array' => false, 'filters' => ['datetime'], - ], + ] ], 'indexes' => [ [ @@ -700,6 +700,172 @@ $commonCollections = [ ], ], + 'identities' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('identities'), + 'name' => 'Identities', + 'attributes' => [ + [ + '$id' => ID::custom('userInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('userId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('provider'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 128, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerUid'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 2048, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerEmail'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 320, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerAccessToken'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], + [ + '$id' => ID::custom('providerAccessTokenExpiry'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('providerRefreshToken'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], + [ + // Used to store data from provider that may or may not be sensitive + '$id' => ID::custom('secrets'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => [], + 'array' => false, + 'filters' => ['json', 'encrypt'], + ], + ], + 'indexes' => [ + [ + '$id' => ID::custom('_key_userInternalId_provider_providerUid'), + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['userInternalId', 'provider', 'providerUid'], + 'lengths' => [Database::LENGTH_KEY, 100, 385], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_provider_providerUid'), + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['provider', 'providerUid'], + 'lengths' => [100, 640], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_userId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['userId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_userInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['userInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_provider'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['provider'], + 'lengths' => [100], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerUid'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerUid'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerEmail'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerEmail'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerAccessTokenExpiry'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerAccessTokenExpiry'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + ], + ], + 'teams' => [ '$collection' => ID::custom(Database::METADATA), '$id' => ID::custom('teams'), @@ -1061,14 +1227,14 @@ $commonCollections = [ 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['name'], 'lengths' => [], - 'orders' => [Database::ORDER_ASC], + 'orders' => [], ], [ '$id' => ID::custom('_key_search'), 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], 'lengths' => [], - 'orders' => [Database::ORDER_ASC], + 'orders' => [], ], [ '$id' => ID::custom('_key_enabled'), @@ -1147,7 +1313,7 @@ $commonCollections = [ 'type' => Database::VAR_INTEGER, 'format' => '', 'size' => 8, - 'signed' => true, + 'signed' => false, 'required' => true, 'default' => null, 'array' => false, @@ -1175,6 +1341,17 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('type'), + 'type' => Database::VAR_INTEGER, + 'format' => '', + 'size' => 1, + 'signed' => false, + 'required' => true, + 'default' => 0, // 0 -> count, 1 -> sum + 'array' => false, + 'filters' => [], + ], ], 'indexes' => [ [ @@ -1193,47 +1370,8 @@ $commonCollections = [ ], [ '$id' => ID::custom('_key_metric_period_time'), - 'type' => Database::INDEX_UNIQUE, - 'attributes' => ['metric', 'period', 'time'], - 'lengths' => [], - 'orders' => [Database::ORDER_DESC], - ], - ], - ], - - 'statsLogger' => [ - '$collection' => ID::custom(Database::METADATA), - '$id' => ID::custom('statsLogger'), - 'name' => 'StatsLogger', - 'attributes' => [ - [ - '$id' => ID::custom('time'), - 'type' => Database::VAR_DATETIME, - 'format' => '', - 'size' => 0, - 'signed' => false, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => ['datetime'], - ], - [ - '$id' => ID::custom('metrics'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 5012, - 'signed' => true, - 'required' => false, - 'default' => [], - 'array' => false, - 'filters' => ['json'], - ], - ], - 'indexes' => [ - [ - '$id' => ID::custom('_key_time'), 'type' => Database::INDEX_KEY, - 'attributes' => ['time'], + 'attributes' => ['metric', 'period', 'time'], 'lengths' => [], 'orders' => [Database::ORDER_DESC], ], @@ -1278,6 +1416,17 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('default'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], [ '$id' => ID::custom('credentials'), 'type' => Database::VAR_STRING, @@ -1498,6 +1647,17 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('targets'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['subQueryTopicTargets'], + ] ], 'indexes' => [ [ @@ -1536,28 +1696,6 @@ $commonCollections = [ '$id' => ID::custom('subscribers'), 'name' => 'Subscribers', 'attributes' => [ - [ - '$id' => ID::custom('userId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('userInternalId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], [ '$id' => ID::custom('targetId'), 'type' => Database::VAR_STRING, @@ -1604,20 +1742,6 @@ $commonCollections = [ ], ], 'indexes' => [ - [ - '$id' => ID::custom('_key_userId'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['userId'], - 'lengths' => [128], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_userInternalId'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['userInternalId'], - 'lengths' => [128], - 'orders' => [Database::ORDER_ASC], - ], [ '$id' => ID::custom('_key_targetId'), 'type' => Database::INDEX_KEY, @@ -1704,16 +1828,16 @@ $commonCollections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, - 'filters' => [], + 'filters' => ['subQueryProviderType'], ], [ '$id' => ID::custom('identifier'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 2048, + 'size' => Database::LENGTH_KEY, 'signed' => true, 'required' => true, 'default' => null, @@ -1749,16 +1873,9 @@ $commonCollections = [ 'attributes' => ['providerInternalId'], 'lengths' => [], 'orders' => [], - ], - [ - '$id' => ID::custom('_key_providerType'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['providerType'], - 'lengths' => [], - 'orders' => [], - ], + ] ], - ] + ], ]; $projectCollections = array_merge([ @@ -2190,6 +2307,109 @@ $projectCollections = array_merge([ 'required' => true, 'array' => false, ], + [ + '$id' => ID::custom('live'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => true, + 'array' => false, + ], + [ + '$id' => ID::custom('installationId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('installationInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerRepositoryId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('repositoryId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('repositoryInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerBranch'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerRootDirectory'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerSilentMode'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('logging'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => true, + 'array' => false, + ], [ '$id' => ID::custom('runtime'), 'type' => Database::VAR_STRING, @@ -2207,7 +2427,7 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2251,7 +2471,7 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2300,6 +2520,39 @@ $projectCollections = array_merge([ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('version'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 8, + 'signed' => true, + 'required' => false, + 'default' => 'v3', + 'array' => false, + 'filters' => [], + ], + [ + 'array' => false, + '$id' => ID::custom('entrypoint'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'filters' => [], + ], + [ + 'array' => false, + '$id' => ID::custom('commands'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'filters' => [], + ] ], 'indexes' => [ [ @@ -2307,7 +2560,7 @@ $projectCollections = array_merge([ 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], 'lengths' => [], - 'orders' => [Database::ORDER_ASC], + 'orders' => [], ], [ '$id' => ID::custom('_key_name'), @@ -2323,6 +2576,41 @@ $projectCollections = array_merge([ 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_installationId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['installationId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_installationInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['installationInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerRepositoryId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerRepositoryId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_repositoryId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['repositoryId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_repositoryInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['repositoryInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], [ '$id' => ID::custom('_key_runtime'), 'type' => Database::INDEX_KEY, @@ -2336,21 +2624,7 @@ $projectCollections = array_merge([ 'attributes' => ['deployment'], 'lengths' => [], 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_schedule'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['schedule'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_timeout'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['timeout'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], + ] ], ], @@ -2365,7 +2639,7 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2398,7 +2672,7 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2425,6 +2699,17 @@ $projectCollections = array_merge([ 'default' => null, 'filters' => [], ], + [ + 'array' => false, + '$id' => ID::custom('commands'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 2048, + 'signed' => true, + 'required' => false, + 'default' => null, + 'filters' => [], + ], [ '$id' => ID::custom('path'), 'type' => Database::VAR_STRING, @@ -2436,6 +2721,188 @@ $projectCollections = array_merge([ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('type'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 2048, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('installationId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('installationInternalId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerRepositoryId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('repositoryId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('repositoryInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerRepositoryName'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerRepositoryOwner'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerRepositoryUrl'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerCommitHash'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerCommitAuthorUrl'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerCommitAuthor'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerCommitMessage'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerCommitUrl'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerBranch'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerBranchUrl'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerRootDirectory'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('providerCommentId'), + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => 2048, + 'format' => '', + 'filters' => [], + 'required' => false, + 'array' => false, + ], [ '$id' => ID::custom('size'), 'type' => Database::VAR_INTEGER, @@ -2525,13 +2992,6 @@ $projectCollections = array_merge([ 'lengths' => [], 'orders' => [], ], - [ - '$id' => ID::custom('_key_entrypoint'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['entrypoint'], - 'lengths' => [768], - 'orders' => [Database::ORDER_ASC], - ], [ '$id' => ID::custom('_key_size'), 'type' => Database::INDEX_KEY, @@ -2595,12 +3055,23 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => 'deploymentInternalId', + '$id' => ID::custom('size'), + 'type' => Database::VAR_INTEGER, + 'format' => '', + 'size' => 0, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('deploymentInternalId'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2639,7 +3110,7 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('outputPath'), + '$id' => ID::custom('path'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => 2048, @@ -2650,18 +3121,7 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('stderr'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 1000000, - 'signed' => true, - 'required' => false, - 'default' => '', - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('stdout'), + '$id' => ID::custom('logs'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => 1000000, @@ -2716,7 +3176,7 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2738,7 +3198,7 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -2777,7 +3237,18 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('response'), + '$id' => ID::custom('duration'), + 'type' => Database::VAR_FLOAT, + 'format' => '', + 'size' => 0, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('errors'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => 1000000, @@ -2788,7 +3259,7 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('stderr'), + '$id' => ID::custom('logs'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => 1000000, @@ -2799,18 +3270,40 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('stdout'), + 'array' => false, + '$id' => ID::custom('requestMethod'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 1000000, + 'size' => 128, + 'signed' => true, + 'required' => false, + 'default' => null, + 'filters' => [], + ], + [ + 'array' => false, + '$id' => ID::custom('requestPath'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 2048, + 'signed' => true, + 'required' => false, + 'default' => null, + 'filters' => [], + ], + [ + '$id' => ID::custom('requestHeaders'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, 'signed' => true, 'required' => false, 'default' => null, 'array' => false, - 'filters' => [], + 'filters' => ['json'], ], [ - '$id' => ID::custom('statusCode'), + '$id' => ID::custom('responseStatusCode'), 'type' => Database::VAR_INTEGER, 'format' => '', 'size' => 0, @@ -2821,15 +3314,15 @@ $projectCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('duration'), - 'type' => Database::VAR_FLOAT, + '$id' => ID::custom('responseHeaders'), + 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 0, + 'size' => 16384, 'signed' => true, 'required' => false, 'default' => null, 'array' => false, - 'filters' => [], + 'filters' => ['json'], ], [ '$id' => ID::custom('search'), @@ -2873,9 +3366,9 @@ $projectCollections = array_merge([ 'orders' => [Database::ORDER_ASC], ], [ - '$id' => ID::custom('_key_statusCode'), + '$id' => ID::custom('_key_responseStatusCode'), 'type' => Database::INDEX_KEY, - 'attributes' => ['statusCode'], + 'attributes' => ['responseStatusCode'], 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], @@ -2889,99 +3382,6 @@ $projectCollections = array_merge([ ], ], - 'variables' => [ - '$collection' => Database::METADATA, - '$id' => 'variables', - 'name' => 'variables', - 'attributes' => [ - [ - '$id' => 'functionInternalId', - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => 'functionId', - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => 'key', - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => 'value', - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 8192, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [ 'encrypt' ] - ], - [ - '$id' => ID::custom('search'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 16384, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - ], - 'indexes' => [ - [ - '$id' => '_key_function', - 'type' => Database::INDEX_KEY, - 'attributes' => ['functionInternalId'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => '_key_uniqueKey', - 'type' => Database::INDEX_UNIQUE, - 'attributes' => ['functionInternalId', 'key'], - 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], - ], - [ - '$id' => '_key_key', - 'type' => Database::INDEX_KEY, - 'attributes' => ['key'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_fulltext_search'), - 'type' => Database::INDEX_FULLTEXT, - 'attributes' => ['search'], - 'lengths' => [], - 'orders' => [], - ], - ], - ], - 'cache' => [ '$collection' => Database::METADATA, '$id' => 'cache', @@ -3020,7 +3420,7 @@ $projectCollections = array_merge([ 'array' => false, 'filters' => [], ], - ], + ], 'indexes' => [ [ '$id' => '_key_accessedAt', @@ -3038,6 +3438,261 @@ $projectCollections = array_merge([ ], ], ], + + 'variables' => [ + '$collection' => Database::METADATA, + '$id' => 'variables', + 'name' => 'variables', + 'attributes' => [ + [ + '$id' => ID::custom('resourceType'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 100, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => 'key', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => 'value', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 8192, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'] + ], + [ + '$id' => ID::custom('search'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + ], + 'indexes' => [ + [ + '$id' => '_key_resourceInternalId', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [], + ], + [ + '$id' => '_key_resourceType', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceType'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_resourceId_resourceType', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceId', 'resourceType'], + 'lengths' => [Database::LENGTH_KEY, 100], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => '_key_uniqueKey', + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['resourceId', 'key', 'resourceType'], + 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY, 100], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => '_key_key', + 'type' => Database::INDEX_KEY, + 'attributes' => ['key'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_fulltext_search'), + 'type' => Database::INDEX_FULLTEXT, + 'attributes' => ['search'], + 'lengths' => [], + 'orders' => [], + ], + ], + ], + + 'migrations' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('migrations'), + 'name' => 'Migrations', + 'attributes' => [ + [ + '$id' => ID::custom('status'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('stage'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('source'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 8192, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('credentials'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 65536, + 'signed' => true, + 'required' => false, + 'default' => [], + 'array' => false, + 'filters' => ['json', 'encrypt'], + ], + [ + '$id' => ID::custom('resources'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => [], + 'array' => true, + 'filters' => [], + ], + [ + '$id' => ID::custom('statusCounters'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 3000, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => ['json'], + ], + [ + '$id' => ID::custom('resourceData'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 131070, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => ['json'], + ], + [ + '$id' => ID::custom('errors'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 65535, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => true, + 'filters' => [], + ], + [ + '$id' => ID::custom('search'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ] + ], + 'indexes' => [ + [ + '$id' => '_key_status', + 'type' => Database::INDEX_KEY, + 'attributes' => ['status'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_stage', + 'type' => Database::INDEX_KEY, + 'attributes' => ['stage'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_source', + 'type' => Database::INDEX_KEY, + 'attributes' => ['source'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_fulltext_search'), + 'type' => Database::INDEX_FULLTEXT, + 'attributes' => ['search'], + 'lengths' => [], + 'orders' => [], + ] + ], + ], ], $commonCollections); $consoleCollections = array_merge([ @@ -3299,17 +3954,6 @@ $consoleCollections = array_merge([ 'array' => false, 'filters' => ['subQueryKeys'], ], - [ - '$id' => ID::custom('domains'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 16384, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => ['subQueryDomains'], - ], [ '$id' => ID::custom('search'), 'type' => Database::VAR_STRING, @@ -3445,7 +4089,7 @@ $consoleCollections = array_merge([ [ '$id' => ID::custom('_key_region_resourceType_resourceUpdatedAt'), 'type' => Database::INDEX_KEY, - 'attributes' => ['region', 'resourceType','resourceUpdatedAt'], + 'attributes' => ['region', 'resourceType', 'resourceUpdatedAt'], 'lengths' => [], 'orders' => [], ], @@ -3553,111 +4197,6 @@ $consoleCollections = array_merge([ ], ], - 'domains' => [ - '$collection' => ID::custom(Database::METADATA), - '$id' => ID::custom('domains'), - 'name' => 'domains', - 'attributes' => [ - [ - '$id' => ID::custom('projectInternalId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('projectId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('updated'), - 'type' => Database::VAR_DATETIME, - 'format' => '', - 'size' => 0, - 'signed' => false, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => ['datetime'], - ], - [ - '$id' => ID::custom('domain'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('tld'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('registerable'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('verification'), - 'type' => Database::VAR_BOOLEAN, - 'format' => '', - 'size' => 0, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('certificateId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - ], - 'indexes' => [ - [ - '$id' => ID::custom('_key_project'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['projectInternalId'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], - ], - ], - ], - 'keys' => [ '$collection' => ID::custom(Database::METADATA), '$id' => ID::custom('keys'), @@ -3939,10 +4478,10 @@ $consoleCollections = array_merge([ 'filters' => [], ], [ - '$id' => ID::custom('log'), + '$id' => ID::custom('logs'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 16384, + 'size' => 1000000, 'signed' => true, 'required' => false, 'default' => null, @@ -4021,6 +4560,564 @@ $consoleCollections = array_merge([ ], ] ], + + 'rules' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('rules'), + 'name' => 'Rules', + 'attributes' => [ + [ + '$id' => ID::custom('projectId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('projectInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('domain'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceType'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 100, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('status'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('certificateId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ] + ], + 'indexes' => [ + [ + '$id' => ID::custom('_key_domain'), + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['domain'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_resourceInternalId', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_resourceId', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_resourceType', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceType'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + ], + ], + + 'installations' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('installations'), + 'name' => 'installations', + 'attributes' => [ + [ + '$id' => ID::custom('projectId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('projectInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerInstallationId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('organization'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('provider'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('personal'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], + ], + 'indexes' => [ + + [ + '$id' => ID::custom('_key_projectInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerInstallationId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerInstallationId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + ], + ], + + 'repositories' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('repositories'), + 'name' => 'repositories', + 'attributes' => [ + [ + '$id' => ID::custom('installationId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('installationInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('projectId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('projectInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerRepositoryId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('resourceId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('resourceType'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('providerPullRequestIds'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 128, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => true, + 'filters' => [], + ], + ], + 'indexes' => [ + [ + '$id' => ID::custom('_key_installationId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['installationId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_installationInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['installationInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerRepositoryId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerRepositoryId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_resourceId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_resourceInternalId', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_resourceType'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceType'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ] + ], + ], + + 'vcsComments' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('vcsComments'), + 'name' => 'vcsComments', + 'attributes' => [ + [ + '$id' => ID::custom('installationId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('installationInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('projectId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('projectInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('providerRepositoryId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('providerCommentId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('providerPullRequestId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + [ + '$id' => ID::custom('providerBranch'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], + ], + 'indexes' => [ + [ + '$id' => ID::custom('_key_installationId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['installationId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_installationInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['installationInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectInternalId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_projectId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerRepositoryId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerRepositoryId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerPullRequestId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerPullRequestId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_providerBranch'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['providerBranch'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + ], + ], + + 'vcsCommentLocks' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('vcsCommentLocks'), + 'name' => 'vcsCommentLocks', + 'attributes' => [], + 'indexes' => [] + ], ], $commonCollections); $bucketCollections = [ @@ -4234,7 +5331,7 @@ $bucketCollections = [ 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], 'lengths' => [], - 'orders' => [Database::ORDER_ASC], + 'orders' => [], ], [ '$id' => ID::custom('_key_bucket'), @@ -4408,7 +5505,7 @@ $dbCollections = [ 'orders' => [Database::ORDER_ASC], ], ], - ], + ] ]; diff --git a/app/config/errors.php b/app/config/errors.php index ed1a9f0aa2..ea95e5dfbe 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -98,6 +98,11 @@ return [ 'description' => 'Usage stats is not configured. Please check the value of the _APP_USAGE_STATS environment variable of your Appwrite server.', 'code' => 501, ], + Exception::GENERAL_NOT_IMPLEMENTED => [ + 'name' => Exception::GENERAL_NOT_IMPLEMENTED, + 'description' => 'This method was not fully implemented yet. If you believe this is a mistake, please upgrade your Appwrite server version.', + 'code' => 405, + ], /** User Errors */ Exception::USER_COUNT_EXCEEDED => [ @@ -112,12 +117,12 @@ return [ ], Exception::USER_ALREADY_EXISTS => [ 'name' => Exception::USER_ALREADY_EXISTS, - 'description' => 'A user with the same id, email, or phone already exists in your project.', + 'description' => 'A user with the same id, email, or phone already exists in this project.', 'code' => 409, ], Exception::USER_BLOCKED => [ 'name' => Exception::USER_BLOCKED, - 'description' => 'The current user has been blocked.', + 'description' => 'The current user has been blocked. You can unblock the user by making a request to the User API\'s "Update User Status" endpoint or in the Appwrite Console\'s Auth section.', 'code' => 401, ], Exception::USER_INVALID_TOKEN => [ @@ -177,12 +182,12 @@ return [ ], Exception::USER_PASSWORD_RECENTLY_USED => [ 'name' => Exception::USER_PASSWORD_RECENTLY_USED, - 'description' => 'The password you are trying to use is similar to your previous password. Please choose a stronger password.', + 'description' => 'The password you are trying to use is similar to your previous password. For your security, please choose a different password and try again.', 'code' => 400, ], Exception::USER_PASSWORD_PERSONAL_DATA => [ 'name' => Exception::USER_PASSWORD_PERSONAL_DATA, - 'description' => 'The password you are trying to use contains references to your name, email, phone or userID. Please choose a different password and try again.', + 'description' => 'The password you are trying to use contains references to your name, email, phone or userID. For your security, please choose a different password and try again.', 'code' => 400, ], Exception::USER_SESSION_NOT_FOUND => [ @@ -190,6 +195,11 @@ return [ 'description' => 'The current user session could not be found.', 'code' => 404, ], + Exception::USER_IDENTITY_NOT_FOUND => [ + 'name' => Exception::USER_IDENTITY_NOT_FOUND, + 'description' => 'The identity could not be found. Please sign in with OAuth provider to create identity first.', + 'code' => 404, + ], Exception::USER_UNAUTHORIZED => [ 'name' => Exception::USER_UNAUTHORIZED, 'description' => 'The current user is not authorized to perform the requested action.', @@ -249,7 +259,7 @@ return [ ], Exception::TEAM_INVALID_SECRET => [ 'name' => Exception::TEAM_INVALID_SECRET, - 'description' => 'The team invitation secret is invalid.', + 'description' => 'The team invitation secret is invalid. Please request a new invitation and try again.', 'code' => 401, ], Exception::TEAM_MEMBERSHIP_MISMATCH => [ @@ -264,7 +274,7 @@ return [ ], Exception::TEAM_ALREADY_EXISTS => [ 'name' => Exception::TEAM_ALREADY_EXISTS, - 'description' => 'Team with requested ID already exists.', + 'description' => 'Team with requested ID already exists. Please choose a different ID and try again.', 'code' => 409, ], @@ -276,7 +286,7 @@ return [ ], Exception::MEMBERSHIP_ALREADY_CONFIRMED => [ 'name' => Exception::MEMBERSHIP_ALREADY_CONFIRMED, - 'description' => 'Membership already confirmed', + 'description' => 'Membership is already confirmed.', 'code' => 409, ], @@ -308,6 +318,11 @@ return [ ], /** Storage */ + Exception::STORAGE_FILE_ALREADY_EXISTS => [ + 'name' => Exception::STORAGE_FILE_ALREADY_EXISTS, + 'description' => 'A storage file with the requested ID already exists.', + 'code' => 409, + ], Exception::STORAGE_FILE_NOT_FOUND => [ 'name' => Exception::STORAGE_FILE_NOT_FOUND, 'description' => 'The requested file could not be found.', @@ -340,7 +355,7 @@ return [ ], Exception::STORAGE_BUCKET_ALREADY_EXISTS => [ 'name' => Exception::STORAGE_BUCKET_ALREADY_EXISTS, - 'description' => 'A storage bucket with the requested ID already exists.', + 'description' => 'A storage bucket with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.', 'code' => 409, ], Exception::STORAGE_BUCKET_NOT_FOUND => [ @@ -360,7 +375,34 @@ return [ ], Exception::STORAGE_INVALID_APPWRITE_ID => [ 'name' => Exception::STORAGE_INVALID_APPWRITE_ID, - 'description' => 'The value for x-appwrite-id header is invalid. Please check the value of the x-appwrite-id header is valid id and not unique().', + 'description' => 'The value for x-appwrite-id header is invalid. Please check the value of the x-appwrite-id header is a valid id and not unique().', + 'code' => 400, + ], + + /** VCS */ + Exception::INSTALLATION_NOT_FOUND => [ + 'name' => Exception::INSTALLATION_NOT_FOUND, + 'description' => 'Installation with the requested ID could not be found. Check to see if the ID is correct, or create the installation.', + 'code' => 404, + ], + Exception::PROVIDER_REPOSITORY_NOT_FOUND => [ + 'name' => Exception::PROVIDER_REPOSITORY_NOT_FOUND, + 'description' => 'VCS (Version Control System) repository with the requested ID could not be found. Check to see if the ID is correct, and if it belongs to installationId you provided.', + 'code' => 404, + ], + Exception::REPOSITORY_NOT_FOUND => [ + 'name' => Exception::REPOSITORY_NOT_FOUND, + 'description' => 'Repository with the requested ID could not be found. Check to see if the ID is correct, or create the respository.', + 'code' => 404, + ], + Exception::PROVIDER_CONTRIBUTION_CONFLICT => [ + 'name' => Exception::PROVIDER_CONTRIBUTION_CONFLICT, + 'description' => 'External contribution is already authorized.', + 'code' => 409, + ], + Exception::GENERAL_PROVIDER_FAILURE => [ + 'name' => Exception::GENERAL_PROVIDER_FAILURE, + 'description' => 'VCS (Version Control System) provider failed to proccess the request. We believe this is an error with the VCS provider. Try again, or contact support for more information.', 'code' => 400, ], @@ -375,6 +417,11 @@ return [ 'description' => 'The requested runtime is either inactive or unsupported. Please check the value of the _APP_FUNCTIONS_RUNTIMES environment variable.', 'code' => 404, ], + Exception::FUNCTION_ENTRYPOINT_MISSING => [ + 'name' => Exception::FUNCTION_RUNTIME_UNSUPPORTED, + 'description' => 'Entrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function\'s "Settings" > "Configuration" > "Entrypoint".', + 'code' => 404, + ], /** Builds */ Exception::BUILD_NOT_FOUND => [ @@ -428,7 +475,7 @@ return [ ], Exception::COLLECTION_ALREADY_EXISTS => [ 'name' => Exception::COLLECTION_ALREADY_EXISTS, - 'description' => 'A collection with the requested ID already exists.', + 'description' => 'A collection with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.', 'code' => 409, ], Exception::COLLECTION_LIMIT_EXCEEDED => [ @@ -450,17 +497,17 @@ return [ ], Exception::DOCUMENT_MISSING_DATA => [ 'name' => Exception::DOCUMENT_MISSING_DATA, - 'description' => 'The document data is missing. You must provide the document data.', + 'description' => 'The document data is missing. Try again with document data populated', 'code' => 400, ], Exception::DOCUMENT_MISSING_PAYLOAD => [ 'name' => Exception::DOCUMENT_MISSING_PAYLOAD, - 'description' => 'The document data and permissions are missing. You must provide either the document data or permissions to be updated.', + 'description' => 'The document data and permissions are missing. You must provide either document data or permissions to be updated.', 'code' => 400, ], Exception::DOCUMENT_ALREADY_EXISTS => [ 'name' => Exception::DOCUMENT_ALREADY_EXISTS, - 'description' => 'Document with the requested ID already exists.', + 'description' => 'Document with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.', 'code' => 409, ], Exception::DOCUMENT_UPDATE_CONFLICT => [ @@ -502,7 +549,7 @@ return [ ], Exception::ATTRIBUTE_ALREADY_EXISTS => [ 'name' => Exception::ATTRIBUTE_ALREADY_EXISTS, - 'description' => 'Attribute with the requested ID already exists.', + 'description' => 'Attribute with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.', 'code' => 409, ], Exception::ATTRIBUTE_LIMIT_EXCEEDED => [ @@ -534,7 +581,7 @@ return [ ], Exception::INDEX_ALREADY_EXISTS => [ 'name' => Exception::INDEX_ALREADY_EXISTS, - 'description' => 'Index with the requested ID already exists.', + 'description' => 'Index with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.', 'code' => 409, ], Exception::INDEX_INVALID => [ @@ -551,7 +598,7 @@ return [ ], Exception::PROJECT_ALREADY_EXISTS => [ 'name' => Exception::PROJECT_ALREADY_EXISTS, - 'description' => 'Project with the requested ID already exists.', + 'description' => 'Project with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.', 'code' => 409, ], Exception::PROJECT_UNKNOWN => [ @@ -589,14 +636,44 @@ return [ 'description' => 'The project key has expired. Please generate a new key using the Appwrite console.', 'code' => 401, ], + Exception::ROUTER_HOST_NOT_FOUND => [ + 'name' => Exception::ROUTER_HOST_NOT_FOUND, + 'description' => 'Host is not trusted. This could occur because you have not configured a custom domain. Add a custom domain to your project first and try again.', + 'code' => 404, + ], + Exception::ROUTER_DOMAIN_NOT_CONFIGURED => [ + 'name' => Exception::ROUTER_DOMAIN_NOT_CONFIGURED, + 'description' => 'Domain environment variables not configured. Please configure domain environment variables before using Appwrite outside of localhost.', + 'code' => 500, + ], + Exception::RULE_RESOURCE_NOT_FOUND => [ + 'name' => Exception::RULE_RESOURCE_NOT_FOUND, + 'description' => 'Resource could not be found. Please check if the resourceId and resourceType are correct, or if the resource actually exists.', + 'code' => 404, + ], + Exception::RULE_NOT_FOUND => [ + 'name' => Exception::RULE_NOT_FOUND, + 'description' => 'Rule with the requested ID could not be found. Please check if the ID provided is correct or if the rule actually exists.', + 'code' => 404, + ], + Exception::RULE_ALREADY_EXISTS => [ + 'name' => Exception::RULE_ALREADY_EXISTS, + 'description' => 'Domain is already used. Please try again with a different domain.', + 'code' => 409, + ], + Exception::RULE_VERIFICATION_FAILED => [ + 'name' => Exception::RULE_VERIFICATION_FAILED, + 'description' => 'Domain verification failed. Please check if your DNS records are correct and try again.', + 'code' => 401, + ], Exception::PROJECT_SMTP_CONFIG_INVALID => [ 'name' => Exception::PROJECT_SMTP_CONFIG_INVALID, - 'description' => 'Provided SMTP config is invalid.', + 'description' => 'Provided SMTP config is invalid. Please check the configured values and try again.', 'code' => 400, ], Exception::PROJECT_TEMPLATE_DEFAULT_DELETION => [ 'name' => Exception::PROJECT_TEMPLATE_DEFAULT_DELETION, - 'description' => 'The default template for the project cannot be deleted.', + 'description' => 'You can\'t delete default template. If you are trying to reset your template changes, you can ignore this error as it\'s already been reset.', 'code' => 401, ], Exception::WEBHOOK_NOT_FOUND => [ @@ -614,21 +691,6 @@ return [ 'description' => 'Platform with the requested ID could not be found.', 'code' => 404, ], - Exception::DOMAIN_NOT_FOUND => [ - 'name' => Exception::DOMAIN_NOT_FOUND, - 'description' => 'Domain with the requested ID could not be found.', - 'code' => 404, - ], - Exception::DOMAIN_ALREADY_EXISTS => [ - 'name' => Exception::DOMAIN_ALREADY_EXISTS, - 'description' => 'The requested domain is currently in use by a project.', - 'code' => 409, - ], - Exception::DOMAIN_FORBIDDEN => [ - 'name' => Exception::DOMAIN_FORBIDDEN, - 'description' => 'The requested domain cannot be used as a custom domain.', - 'code' => 403, - ], Exception::VARIABLE_NOT_FOUND => [ 'name' => Exception::VARIABLE_NOT_FOUND, 'description' => 'Variable with the requested ID could not be found.', @@ -636,19 +698,9 @@ return [ ], Exception::VARIABLE_ALREADY_EXISTS => [ 'name' => Exception::VARIABLE_ALREADY_EXISTS, - 'description' => 'Variable with the same ID already exists in your project.', + 'description' => 'Variable with the same ID already exists in this project. Try again with a different ID.', 'code' => 409, ], - Exception::DOMAIN_VERIFICATION_FAILED => [ - 'name' => Exception::DOMAIN_VERIFICATION_FAILED, - 'description' => 'Domain verification for the requested domain has failed.', - 'code' => 401, - ], - Exception::DOMAIN_TARGET_INVALID => [ - 'name' => Exception::DOMAIN_TARGET_INVALID, - 'description' => 'Your Appwrite instance is not publicly accessible. Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.', - 'code' => 501, - ], Exception::GRAPHQL_NO_QUERY => [ 'name' => Exception::GRAPHQL_NO_QUERY, 'description' => 'Param "query" is not optional.', @@ -659,4 +711,21 @@ return [ 'description' => 'Too many queries.', 'code' => 400, ], + + /** Migrations */ + Exception::MIGRATION_NOT_FOUND => [ + 'name' => Exception::MIGRATION_NOT_FOUND, + 'description' => 'Migration with the requested ID could not be found. Please verify that the provided ID is correct and try again.', + 'code' => 404, + ], + Exception::MIGRATION_ALREADY_EXISTS => [ + 'name' => Exception::MIGRATION_ALREADY_EXISTS, + 'description' => 'Migration with the requested ID already exists. Try again with a different ID.', + 'code' => 409, + ], + Exception::MIGRATION_IN_PROGRESS => [ + 'name' => Exception::MIGRATION_IN_PROGRESS, + 'description' => 'Migration is already in progress. You can check the status of the migration in your Appwrite Console\'s "Settings" > "Migrations".', + 'code' => 409, + ], ]; diff --git a/app/config/events.php b/app/config/events.php index 55dfad77d0..c0b6cc3b41 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -236,5 +236,19 @@ return [ 'update' => [ '$description' => 'This event triggers when a function is updated.', ] + ], + 'rules' => [ + '$model' => Response::MODEL_PROXY_RULE, + '$resource' => true, + '$description' => 'This event triggers on any proxy rule event.', + 'create' => [ + '$description' => 'This event triggers when a proxy rule is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a proxy rule is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a proxy rule is updated.', + ] ] ]; diff --git a/app/config/locale/templates/email-base.tpl b/app/config/locale/templates/email-base.tpl index b9b5b1bb8d..f41a9530e1 100644 --- a/app/config/locale/templates/email-base.tpl +++ b/app/config/locale/templates/email-base.tpl @@ -42,39 +42,21 @@ border: none; border-top: 1px solid #E8E9F0; } + + p { + margin-bottom: 10px; + } -
- -
-

- {{subject}} -

-
- - - -
-

{{hello}}

- -

{{body}}

- - {{redirect}} - -


{{footer}}

-
- -

{{thanks}} -
- {{signature}} -

+ {{body}}
diff --git a/app/config/locale/templates/email-inner-base.tpl b/app/config/locale/templates/email-inner-base.tpl new file mode 100644 index 0000000000..53ffe83a5b --- /dev/null +++ b/app/config/locale/templates/email-inner-base.tpl @@ -0,0 +1,15 @@ +

{{hello}}

+ +
+ +

{{body}}

+ +{{redirect}} + +

{{footer}}

+ +
+ +

{{thanks}}

+ +

{{signature}}

\ No newline at end of file diff --git a/app/config/locale/translations/af.json b/app/config/locale/translations/af.json index d3bccdadae..f81800dbb2 100644 --- a/app/config/locale/translations/af.json +++ b/app/config/locale/translations/af.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s span", "emails.verification.subject": "Rekening Bevestiging", - "emails.verification.hello": "Goeie dag {{name}}", + "emails.verification.hello": "Goeie dag {{user}}", "emails.verification.body": "Volg hierdie skakel om u e-pos adres te bevestig.", "emails.verification.footer": "Ignoreer gerus hierdie boodskap as u nie die versoek gestuur het om u adres te bevestig nie.", "emails.verification.thanks": "Baie dankie", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Baie dankie", "emails.magicSession.signature": "Die {{project}} span", "emails.recovery.subject": "Herstel Wagwoord", - "emails.recovery.hello": "Goeie dag {{name}}", + "emails.recovery.hello": "Goeie dag {{user}}", "emails.recovery.body": "Volg hierdie skakel om u {{project}} wagwoord te herstel.", "emails.recovery.footer": "Ignoreer gerus hierdie boodskap as u nie die versoek gestuur het om u wagwoord te herstel nie.", "emails.recovery.thanks": "Baie dankie", diff --git a/app/config/locale/translations/ar.json b/app/config/locale/translations/ar.json index 9a40d4f1c3..87d75d7643 100644 --- a/app/config/locale/translations/ar.json +++ b/app/config/locale/translations/ar.json @@ -4,7 +4,7 @@ "settings.direction": "rtl", "emails.sender": "فريق %s", "emails.verification.subject": "تأكيد الحساب", - "emails.verification.hello": "مرحبا {{name}}", + "emails.verification.hello": "مرحبا {{user}}", "emails.verification.body": "برجاء اتباع الرابط التالي لتأكيد بريدك الإلكتروني", "emails.verification.footer": "لو لم تطلب تأكيد هذا البريد الإلكتروني، يمكنك تجاهل هذه الرسالة", "emails.verification.thanks": "شكرا", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "شكرا", "emails.magicSession.signature": "فريق {{project}}", "emails.recovery.subject": "تغيير كلمة السر", - "emails.recovery.hello": "أهلا {{name}}", + "emails.recovery.hello": "أهلا {{user}}", "emails.recovery.body": "برجاء اتباع الراط التالي لتغيير كلمة السر الخاصة بـ{{project}}", "emails.recovery.footer": "لولم تطلب تغيير كلمة السر، يمكنك تجاهل هذه الرسالة", "emails.recovery.thanks": "شكرا", diff --git a/app/config/locale/translations/as.json b/app/config/locale/translations/as.json index 20bd54a8e9..31809f2bbd 100644 --- a/app/config/locale/translations/as.json +++ b/app/config/locale/translations/as.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s দল", "emails.verification.subject": "একাউণ্ট প্ৰমাণীকৰণ", - "emails.verification.hello": "নমস্কাৰ {{name}}", + "emails.verification.hello": "নমস্কাৰ {{user}}", "emails.verification.body": "আপোনাৰ ইমেইল ঠিকনা প্ৰমাণিত কৰিবলৈ এই লিংকটো অনুসৰণ কৰক।", "emails.verification.footer": "যদি আপুনি এই ঠিকনাটো সত্যাপিত কৰিবলৈ কোৱা নাই, আপুনি এই বাৰ্তাটো উপেক্ষা কৰিব পাৰে।", "emails.verification.thanks": "ধন্যবাদ", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ধন্যবাদ", "emails.magicSession.signature": "{{project}} দল", "emails.recovery.subject": "পাছৱাৰ্ড ৰিছেট", - "emails.recovery.hello": "ধন্যবাদ {{name}}", + "emails.recovery.hello": "ধন্যবাদ {{user}}", "emails.recovery.body": "আপোনাৰ {{project}} পাছৱৰ্ড ৰিছেট কৰিবলৈ এই লিংকটো অনুসৰণ কৰক।.", "emails.recovery.footer": "যদি আপুনি আপোনাৰ পাছৱৰ্ড ৰিছেট কৰিবলৈ কোৱা নাছিল, আপুনি এই বাৰ্তাটো উপেক্ষা কৰিব পাৰে।", "emails.recovery.thanks": "ধন্যবাদ", diff --git a/app/config/locale/translations/az.json b/app/config/locale/translations/az.json index dd26ebda8e..55be9e805a 100644 --- a/app/config/locale/translations/az.json +++ b/app/config/locale/translations/az.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Komandası", "emails.verification.subject": "Hesab Doğrulama", - "emails.verification.hello": "Salam {{name}}", + "emails.verification.hello": "Salam {{user}}", "emails.verification.body": "E-poçt ünvanınızı təsdiq etmək üçün bu linki izləyin.", "emails.verification.footer": "Bu ünvanı doğrulamağı xahiş etməmisinizsə, bu mesajı gözardı edə bilərsiniz.", "emails.verification.thanks": "Təşəkkürlər", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Təşəkkürlər", "emails.magicSession.signature": "{{project}} komandası", "emails.recovery.subject": "Şifrə Sıfırlanması", - "emails.recovery.hello": "Salam {{name}}", + "emails.recovery.hello": "Salam {{user}}", "emails.recovery.body": "{{project}} şifrənizi sıfırlamaq üçün bu linki izləyin.", "emails.recovery.footer": "Şifrənizi sıfırlamağı xahiş etməmisinizsə, bu mesajı gözardı edə bilərsiniz.", "emails.recovery.thanks": "Təşəkkürlər", diff --git a/app/config/locale/translations/be.json b/app/config/locale/translations/be.json index c46c40f2c3..73ae26c215 100644 --- a/app/config/locale/translations/be.json +++ b/app/config/locale/translations/be.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Каманда %s", "emails.verification.subject": "Верыфікацыя акаўнта", - "emails.verification.hello": "Прывітанне {{name}}", + "emails.verification.hello": "Прывітанне {{user}}", "emails.verification.body": "Перайдзіце па гэтай спасылцы, каб пацвердзіць свой адрас электроннай пошты", "emails.verification.footer": "Калі вы не запытвалі пацвярджэнне гэтага адрасу, праігнаруйце гэтае паведамленне.", "emails.verification.thanks": "Дзякуем", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Дзякуем", "emails.magicSession.signature": "каманда {{project}}", "emails.recovery.subject": "Скід пароля", - "emails.recovery.hello": "Прывітанне, {{name}}", + "emails.recovery.hello": "Прывітанне, {{user}}", "emails.recovery.body": "Перайдзіце па гэтай спасылцы, каб скінуць пароль для праекта {{project}}.", "emails.recovery.footer": "Калі вы не прасілі скінуць пароль, вы можаце праігнараваць гэта паведамленне.", "emails.recovery.thanks": "Дзякуем", diff --git a/app/config/locale/translations/bh.json b/app/config/locale/translations/bh.json index d151297932..edbc15c28c 100644 --- a/app/config/locale/translations/bh.json +++ b/app/config/locale/translations/bh.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s टीम", "emails.verification.subject": "खाता प्रमाणिकरण", - "emails.verification.hello": "नमस्ते {{name}}", + "emails.verification.hello": "नमस्ते {{user}}", "emails.verification.body": "ईमेल प्रमाणिकरण करे क लेल दिहल गइल लिंक फॉलो करें|", "emails.verification.footer": "अगर ई पता को सत्यापित करे के लिए ना कहाले, तो आप ई संदेश क अनदेखा कर सकत अछि।", "emails.verification.thanks": "धन्यवाद", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "धन्यवाद", "emails.magicSession.signature": "{{project}} टीम", "emails.recovery.subject": "पासवर्ड बदल क लेल|", - "emails.recovery.hello": "प्रणाम {{name}}", + "emails.recovery.hello": "प्रणाम {{user}}", "emails.recovery.body": "पासवर्ड बदल क लेल दिहल गइल लिंक फॉलो करें|", "emails.recovery.footer": "अगर पासवर्ड बदल क लेल ना कहाले, तो आप ई संदेश क अनदेखा कर सकत अछि।", "emails.recovery.thanks": "धन्यवाद", diff --git a/app/config/locale/translations/bn.json b/app/config/locale/translations/bn.json index da8899f699..06ef081610 100644 --- a/app/config/locale/translations/bn.json +++ b/app/config/locale/translations/bn.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s টীম", "emails.verification.subject": "বিষয়", - "emails.verification.hello": "নমস্কার {{name}}", + "emails.verification.hello": "নমস্কার {{user}}", "emails.verification.body": "এই লিঙ্কের মাধ্যমে ইমেইল যাচাই করুন।", "emails.verification.footer": "আপনি যদি এই ঠিকানা যাচাই করতে না বলেন, তাহলে আপনি এই বার্তাটি উপেক্ষা করতে পারেন।", "emails.verification.thanks": "ধন্যবাদ", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ধন্যবাদ", "emails.magicSession.signature": "{{project}} টীম", "emails.recovery.subject": "পাসওয়ার্ড রিসেট", - "emails.recovery.hello": "নমস্কার {{name}}", + "emails.recovery.hello": "নমস্কার {{user}}", "emails.recovery.body": "এই লিঙ্কের মাধ্যমে আপনার {{project}} পাসওয়ার্ড পুনরায় সেট করুন।", "emails.recovery.footer": "আপনি যদি আপনার পাসওয়ার্ড পুনরায় সেট করতে না বলেন, তাহলে আপনি এই বার্তাটি উপেক্ষা করতে পারেন।", "emails.recovery.thanks": "ধন্যবাদ", diff --git a/app/config/locale/translations/ca.json b/app/config/locale/translations/ca.json index 32649b7e66..281f1b9d5f 100644 --- a/app/config/locale/translations/ca.json +++ b/app/config/locale/translations/ca.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Equip", "emails.verification.subject": "Verificació del compte", - "emails.verification.hello": "Hola {{name}}", + "emails.verification.hello": "Hola {{user}}", "emails.verification.body": "Accedeix a aquest enllaç per tal de verificar la teva adreça electrònica.", "emails.verification.footer": "Si no has sol·licitat la verificació d'aquesta adreça electrònica, pots ignorar aquest missatge.", "emails.verification.thanks": "Gràcies", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Gràcies", "emails.magicSession.signature": "Equip {{project}}", "emails.recovery.subject": "Reinicialitzar contrasenya", - "emails.recovery.hello": "Hola {{name}}", + "emails.recovery.hello": "Hola {{user}}", "emails.recovery.body": "Accedeix a aquest enllaç per a reinicialitzar la teva contrasenya de {{project}}.", "emails.recovery.footer": "Si no has sol·licitat reinicialitzar la teva contrasenya, pots ignorar aquest missatge.", "emails.recovery.thanks": "Gràcies", diff --git a/app/config/locale/translations/da.json b/app/config/locale/translations/da.json index 68401be419..73aaef5590 100644 --- a/app/config/locale/translations/da.json +++ b/app/config/locale/translations/da.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Konto Verifikation", - "emails.verification.hello": "Hej {{name}}", + "emails.verification.hello": "Hej {{user}}", "emails.verification.body": "Følg dette link, for at verificere din email adresse.", "emails.verification.footer": "Hvis du ikke har bedt om at verificere denne adresse, ignorer venligst denne besked.", "emails.verification.thanks": "Tak", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Tak", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Nulstil Password", - "emails.recovery.hello": "Hej {{name}}", + "emails.recovery.hello": "Hej {{user}}", "emails.recovery.body": "Følg dette link for at nulstille koden til {{project}}.", "emails.recovery.footer": "Hvis du ikke har bedt om at nulstille dit password, ignorer venligst denne besked.", "emails.recovery.thanks": "Tak", diff --git a/app/config/locale/translations/de.json b/app/config/locale/translations/de.json index b3de6a2fb1..5fa1c14c27 100644 --- a/app/config/locale/translations/de.json +++ b/app/config/locale/translations/de.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Kontoverifizierung", - "emails.verification.hello": "Hey {{name}}", + "emails.verification.hello": "Hey {{user}}", "emails.verification.body": "Folge diesem Link, um deine E-Mail-Adresse zu bestätigen.", "emails.verification.footer": "Solltest du keine Verifizierung dieser E-Mail-Adresse angefordert haben, kannst du diese Nachricht ignorieren.", "emails.verification.thanks": "Danke", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Danke", "emails.magicSession.signature": "{{project}}-Team", "emails.recovery.subject": "Kennwort zurücksetzen", - "emails.recovery.hello": "Hallo {{name}}", + "emails.recovery.hello": "Hallo {{user}}", "emails.recovery.body": "Folge diesem Link, um dein {{project}}-Kennwort zurückzusetzen.", "emails.recovery.footer": "Solltest du keine Kennwort-Zurücksetzung angefordert haben, kannst du diese Nachricht ignorieren.", "emails.recovery.thanks": "Danke", diff --git a/app/config/locale/translations/el.json b/app/config/locale/translations/el.json index 83af3cad0b..88ceeb873e 100644 --- a/app/config/locale/translations/el.json +++ b/app/config/locale/translations/el.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Ομάδα %s", "emails.verification.subject": "Επαλήθευση Λογαριασμού", - "emails.verification.hello": "Γεια σου {{name}}", + "emails.verification.hello": "Γεια σου {{user}}", "emails.verification.body": "Ακολουθήστε αυτό το link για να επαληθεύσετε τη δ/νση του email σας", "emails.verification.footer": "Εάν δεν ζητήσατε επαλήθευση αυτής της δ/νσης email, μπορείτε να αγνοήσετε αυτό το μήνυμα", "emails.verification.thanks": "Ευχαριστούμε", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Ευχαριστούμε", "emails.magicSession.signature": "Η ομάδα του {{project}}", "emails.recovery.subject": "Αλλαγή κωδικού πρόσβασης", - "emails.recovery.hello": "Γεια σου {{name}}", + "emails.recovery.hello": "Γεια σου {{user}}", "emails.recovery.body": "Ακολουθήστε αυτό το link για να αλλάξετε τον {{project}} κωδικό σας", "emails.recovery.footer": "Εάν δεν ζητήσατε αλλαγή του κωδικού σας πρόσβασης, μπορείτε να αγνοήσετε αυτό το μήνυμα", "emails.recovery.thanks": "Ευχαριστούμε", diff --git a/app/config/locale/translations/en.json b/app/config/locale/translations/en.json index 91cc2405b6..681c88ae94 100644 --- a/app/config/locale/translations/en.json +++ b/app/config/locale/translations/en.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Account Verification", - "emails.verification.hello": "Hey {{name}}", + "emails.verification.hello": "Hey {{user}}", "emails.verification.body": "Follow this link to verify your email address.", "emails.verification.footer": "If you didn’t ask to verify this address, you can ignore this message.", "emails.verification.thanks": "Thanks", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Thanks", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Password Reset", - "emails.recovery.hello": "Hello {{name}}", + "emails.recovery.hello": "Hello {{user}}", "emails.recovery.body": "Follow this link to reset your {{project}} password.", "emails.recovery.footer": "If you didn’t ask to reset your password, you can ignore this message.", "emails.recovery.thanks": "Thanks", diff --git a/app/config/locale/translations/eo.json b/app/config/locale/translations/eo.json index e10dfd5d6e..bb553f1ced 100644 --- a/app/config/locale/translations/eo.json +++ b/app/config/locale/translations/eo.json @@ -3,7 +3,7 @@ "settings.direction": "ltr", "emails.sender": "Teamo %s", "emails.verification.subject": "Konta Konfirmo", - "emails.verification.hello": "Saluton {{name}}", + "emails.verification.hello": "Saluton {{user}}", "emails.verification.body": "Alklaku ĉi tiun ligon por kontroli vian retpoŝtan adreson.", "emails.verification.footer": "Se vi ne petis ĉi tiun konfirmon de ĉi tiu retpoŝto, vi povas ignori ĉi tiun mesaĝon.", "emails.verification.thanks": "Dankegon.", @@ -15,7 +15,7 @@ "emails.magicSession.thanks": "Dankegon", "emails.magicSession.signature": "Teamo {{project}}", "emails.recovery.subject": "Parsvorta Restarigo", - "emails.recovery.hello": "Saluton {{name}}", + "emails.recovery.hello": "Saluton {{user}}", "emails.recovery.body": "Alklaku ĉi tiun ligon por reagordi vian pasvorton. {{project}}", "emails.recovery.footer": "Se vi ne petis reagordi vian pasvorton, vi povas ignori ĉi tiun mesaĝon.", "emails.recovery.thanks": "Dankegon", diff --git a/app/config/locale/translations/es.json b/app/config/locale/translations/es.json index d0138bdde8..b22fa0ca93 100644 --- a/app/config/locale/translations/es.json +++ b/app/config/locale/translations/es.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Equipo %s", "emails.verification.subject": "Verificación de cuenta", - "emails.verification.hello": "Hola {{name}}", + "emails.verification.hello": "Hola {{user}}", "emails.verification.body": "Haz clic en este enlace para verificar tu correo.", "emails.verification.footer": "Si no has solicitado verificar este correo, puedes ignorar este mensaje.", "emails.verification.thanks": "Gracias", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Gracias", "emails.magicSession.signature": "Equipo de {{project}}", "emails.recovery.subject": "Restablecer contraseña", - "emails.recovery.hello": "Hola {{name}}", + "emails.recovery.hello": "Hola {{user}}", "emails.recovery.body": "Haz clic en este enlace para restablecer la contraseña de {{project}}.", "emails.recovery.footer": "Si no has solicitado restablecer la contraseña, puedes ignorar este mensaje.", "emails.recovery.thanks": "Gracias", diff --git a/app/config/locale/translations/fa.json b/app/config/locale/translations/fa.json index 346e3759bf..ef1e74cf0e 100644 --- a/app/config/locale/translations/fa.json +++ b/app/config/locale/translations/fa.json @@ -4,29 +4,29 @@ "settings.direction": "rtl", "emails.sender": "تیم %s", "emails.verification.subject": "تأیید حساب", - "emails.verification.hello": "سلام {{name}}", + "emails.verification.hello": "سلام {{user}}", "emails.verification.body": "برای تأیید ایمیل‌تان پیوند زیر را دنبال کنید.", "emails.verification.footer": "اگر شما درخواست تأیید حساب نداده‌اید، می‌توانید این پیام را نادیده بگیرید.", "emails.verification.thanks": "سپاس فراوان", - "emails.verification.signature": "تیم {{name}}", + "emails.verification.signature": "تیم {{user}}", "emails.magicSession.subject": "ورود به حساب کاربری", "emails.magicSession.hello": "سلام،", "emails.magicSession.body": "برای ورود به حساب‌تان پیوند زیر را دنبال کنید.", "emails.magicSession.footer": "اگر شما درخواست ورود به حساب کاربری با استفاده از این ایمیل را نداد‌ه‌اید، می‌توانید این پیام را نادیده بگیرید.", "emails.magicSession.thanks": "سپاس فراوان", - "emails.magicSession.signature": "تیم {{name}}", + "emails.magicSession.signature": "تیم {{user}}", "emails.recovery.subject": "بازیابی گذرواژه", - "emails.recovery.hello": "سلام {{name}}", + "emails.recovery.hello": "سلام {{user}}", "emails.recovery.body": "برای بازیابی گذرواژه‌تان پیوند زیر را دنبال کنید.", "emails.recovery.footer": "اگر شما درخواست بازیابی گذرواژه نداده‌اید، می‌توانید این پیام را نادیده بگیرید.", "emails.recovery.thanks": "سپاس فراوان", - "emails.recovery.signature": "تیم {{name}}", + "emails.recovery.signature": "تیم {{user}}", "emails.invitation.subject": "دعوت به تیم %s در %s", "emails.invitation.hello": "سلام", "emails.invitation.body": "این ایمیل برای شما فرستاده شده‌است زیرا {{owner}} می‌خواهد شما را به تیم {{team}} در پروژه‌ی {{project}} بیفزاید.", "emails.invitation.footer": "اگر علاقه ندارید، می‌توانید این پیام را نادیده بگیرید.", "emails.invitation.thanks": "سپاس فراوان", - "emails.invitation.signature": "تیم {{name}}", + "emails.invitation.signature": "تیم {{user}}", "locale.country.unknown": "ناشناخته", "countries.af": "افغانستان", "countries.ao": "آنگولا", diff --git a/app/config/locale/translations/fr.json b/app/config/locale/translations/fr.json index 362d04c93a..29fdb8645e 100644 --- a/app/config/locale/translations/fr.json +++ b/app/config/locale/translations/fr.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Équipe %s", "emails.verification.subject": "Vérification du compte", - "emails.verification.hello": "Bonjour {{name}}", + "emails.verification.hello": "Bonjour {{user}}", "emails.verification.body": "Suivez ce lien pour vérifier votre adresse e-mail.", "emails.verification.footer": "Si vous n'avez pas demandé à vérifier cette adresse, vous pouvez ignorer ce message.", "emails.verification.thanks": "Merci", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Merci", "emails.magicSession.signature": "L'équipe {{project}}", "emails.recovery.subject": "Réinitialisation du mot de passe", - "emails.recovery.hello": "Bonjour {{name}}", + "emails.recovery.hello": "Bonjour {{user}}", "emails.recovery.body": "Suivez ce lien pour réinitialiser votre mot de passe pour {{project}}.", "emails.recovery.footer": "Si vous n'avez pas demandé à réinitialiser votre mot de passe, vous pouvez ignorer ce message.", "emails.recovery.thanks": "Merci", diff --git a/app/config/locale/translations/ga.json b/app/config/locale/translations/ga.json index d572fa01a8..15471f4f66 100644 --- a/app/config/locale/translations/ga.json +++ b/app/config/locale/translations/ga.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Foireann", "emails.verification.subject": "Fíoraithe cuntais", - "emails.verification.hello": "Haigh {{name}}", + "emails.verification.hello": "Haigh {{user}}", "emails.verification.body": "Lean an nasc seo chun do ríomhphost a fhíorú.", "emails.verification.footer": "Mura ndearna tú iarratas an seoladh seo a fhíoru, déan neamhaird den teachtaireacht seo.", "emails.verification.thanks": "Go raibh maith agat", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Go raibh maith agat", "emails.magicSession.signature": "{{project}} foireann", "emails.recovery.subject": "Athshocrú pasfhocail", - "emails.recovery.hello": "Haigh {{name}}", + "emails.recovery.hello": "Haigh {{user}}", "emails.recovery.body": "Lean an nasc seo chun do pasfhocal {{project}} a athshocrú.", "emails.recovery.footer": "Mura ndearna tú iarratas do pasfhocal a athshocrú, déan neamhaird den teachtaireacht seo.", "emails.recovery.thanks": "Go raibh maith agat", diff --git a/app/config/locale/translations/gu.json b/app/config/locale/translations/gu.json index 9357160cc5..1483f5b0b0 100644 --- a/app/config/locale/translations/gu.json +++ b/app/config/locale/translations/gu.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s ટીમ", "emails.verification.subject": "ખાતાની ચકાસણી", - "emails.verification.hello": "નમસ્કાર {{name}}", + "emails.verification.hello": "નમસ્કાર {{user}}", "emails.verification.body": "તમારું ઇમેઇલ સરનામું ચકાસવા માટે આ લિંકને અનુસરો.", "emails.verification.footer": "જો તમે આ સરનામાંની ચકાસણી કરવાનું ન કહ્યું હોય, તો તમે આ સંદેશને અવગણી શકો છો.", "emails.verification.thanks": "આભાર", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "આભાર", "emails.magicSession.signature": "{{project}} ટીમ", "emails.recovery.subject": "પાસવર્ડ ફરીથી સેટ કરો", - "emails.recovery.hello": "નમસ્કાર {{name}}", + "emails.recovery.hello": "નમસ્કાર {{user}}", "emails.recovery.body": "તમારો {{project}} પાસવર્ડ ફરીથી સેટ કરવા માટે આ લિંકને અનુસરો.", "emails.recovery.footer": "જો તમે તમારો પાસવર્ડ ફરીથી સેટ કરવાનું ન કહ્યું હોય, તો તમે આ સંદેશને અવગણી શકો છો.", "emails.recovery.thanks": "આભાર", diff --git a/app/config/locale/translations/he.json b/app/config/locale/translations/he.json index ef4af6f56e..2704341570 100644 --- a/app/config/locale/translations/he.json +++ b/app/config/locale/translations/he.json @@ -4,7 +4,7 @@ "settings.direction": "rtl", "emails.sender": "צוות %s", "emails.verification.subject": "אימות חשבון", - "emails.verification.hello": "שלום {{name}}", + "emails.verification.hello": "שלום {{user}}", "emails.verification.body": "לחץ על קישור זה כדי לאמת את כתובת הדוא\"ל שלך.", "emails.verification.footer": "אם לא ביקשת לאמת כתובת זו, תוכל להתעלם מהודעה זו.", "emails.verification.thanks": "תודה", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "תודה", "emails.magicSession.signature": "צוות {{project}}", "emails.recovery.subject": "איפוס סיסמא", - "emails.recovery.hello": "שלום {{name}}", + "emails.recovery.hello": "שלום {{user}}", "emails.recovery.body": "עקוב אחר קישור זה כדי לאפס את סיסמתך ב-{{project}}.", "emails.recovery.footer": "אם לא ביקשת לאפס את הסיסמה, תוכל להתעלם מהודעה זו.", "emails.recovery.thanks": "תודה", diff --git a/app/config/locale/translations/hi.json b/app/config/locale/translations/hi.json index 2a4229acce..680044f660 100644 --- a/app/config/locale/translations/hi.json +++ b/app/config/locale/translations/hi.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s टीम", "emails.verification.subject": "अकाउंट वेरिफिकेशन ", - "emails.verification.hello": "नमस्ते {{name}}", + "emails.verification.hello": "नमस्ते {{user}}", "emails.verification.body": "इस लिंक के माध्यम से अपने ईमेल को सत्यापित कीजिये।", "emails.verification.footer": "यदि आप इस पते को सत्यापित नहीं करना चाहते हैं, तो आप इस संदेश को नज़रअंदाज़ कर सकते हैं।", "emails.verification.thanks": "धन्यवाद", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "धन्यवाद", "emails.magicSession.signature": "{{project}} टीम", "emails.recovery.subject": "पासवर्ड रीसेट", - "emails.recovery.hello": "नमस्ते {{name}}", + "emails.recovery.hello": "नमस्ते {{user}}", "emails.recovery.body": "इस लिंक के माध्यम से अपना {{project}} पासवर्ड रीसेट करें।", "emails.recovery.footer": "यदि आप अपना पासवर्ड रीसेट नहीं करना चाहते हैं, तो आप इस संदेश को नज़रअंदाज़ कर सकते हैं।", "emails.recovery.thanks": "धन्यवाद", diff --git a/app/config/locale/translations/hr.json b/app/config/locale/translations/hr.json index 4dcebf0a41..fb3057df86 100644 --- a/app/config/locale/translations/hr.json +++ b/app/config/locale/translations/hr.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Tim", "emails.verification.subject": "Verifikacija računa", - "emails.verification.hello": "Pozdrav {{name}}", + "emails.verification.hello": "Pozdrav {{user}}", "emails.verification.body": "Slijedite ovu poveznicu da biste potvrdili svoju adresu e-pošte.", "emails.verification.footer": "Ukoliko niste zatražili potvrdu ove adrese, možete zanemariti ovu poruku.", "emails.verification.thanks": "Hvala", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Hvala", "emails.magicSession.signature": "{{project}} tim", "emails.recovery.subject": "Ponovno postavljanje lozinke", - "emails.recovery.hello": "Pozdrav {{name}}", + "emails.recovery.hello": "Pozdrav {{user}}", "emails.recovery.body": "Slijedite ovu poveznicu za ponovno postavljanje {{project}} lozinke.", "emails.recovery.footer": "Ako niste zatražili ponovno postavljanje Vaše lozinke, možete zanemariti ovu poruku.", "emails.recovery.thanks": "Hvala", diff --git a/app/config/locale/translations/hu.json b/app/config/locale/translations/hu.json index 17ce2e544b..094f6dee1f 100644 --- a/app/config/locale/translations/hu.json +++ b/app/config/locale/translations/hu.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Csapat", "emails.verification.subject": "Fiók Megerősítése", - "emails.verification.hello": "Szia {{name}}", + "emails.verification.hello": "Szia {{user}}", "emails.verification.body": "Kattints a linkre, hogy megerősítsd az email címedet.", "emails.verification.footer": "Ha nem te kérted a címed megerősítését, akkor nyugodtan hagyd figyelmen kívül ezt az üzenetet.", "emails.verification.thanks": "Köszönettel", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Köszönettel", "emails.magicSession.signature": "a {{project}} csapat", "emails.recovery.subject": "Jelszó Visszaállítása", - "emails.recovery.hello": "Hahó, {{name}}", + "emails.recovery.hello": "Hahó, {{user}}", "emails.recovery.body": "Kattints a linkre a {{project}} jelszavad visszaállításához.", "emails.recovery.footer": "Ha nem te kezdeményezted a jelszavad visszaállítását, akkor nyugodtan hagyd figyelmen kívül ezt az üzenetet.", "emails.recovery.thanks": "Köszönettel", diff --git a/app/config/locale/translations/id.json b/app/config/locale/translations/id.json index 06429e9583..eb054d998e 100644 --- a/app/config/locale/translations/id.json +++ b/app/config/locale/translations/id.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Tim %s", "emails.verification.subject": "Verifikasi Akun", - "emails.verification.hello": "Hai {{name}}", + "emails.verification.hello": "Hai {{user}}", "emails.verification.body": "Ikuti tautan ini untuk memverifikasi alamat email Anda.", "emails.verification.footer": "Jika Anda tidak meminta untuk memverifikasi alamat email ini, Anda dapat mengabaikan pesan ini.", "emails.verification.thanks": "Terima kasih", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Terima kasih", "emails.magicSession.signature": "Tim {{project}}", "emails.recovery.subject": "Atur Ulang Kata Sandi", - "emails.recovery.hello": "Halo {{name}}", + "emails.recovery.hello": "Halo {{user}}", "emails.recovery.body": "Ikuti tautan ini untuk menyetel ulang kata sandi {{project}} Anda.", "emails.recovery.footer": "Jika Anda tidak meminta untuk menyetel ulang kata sandi, Anda dapat mengabaikan pesan ini.", "emails.recovery.thanks": "Terima kasih", diff --git a/app/config/locale/translations/it.json b/app/config/locale/translations/it.json index 06080901bf..727e46f94e 100644 --- a/app/config/locale/translations/it.json +++ b/app/config/locale/translations/it.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Team %s", "emails.verification.subject": "Verifica account", - "emails.verification.hello": "Ciao {{name}}", + "emails.verification.hello": "Ciao {{user}}", "emails.verification.body": "Clicca questo link per verificare il tuo indirizzo email.", "emails.verification.footer": "Se non hai richiesto la verifica dell’indirizzo email, puoi ignorare questo messaggio.", "emails.verification.thanks": "Grazie", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Grazie", "emails.magicSession.signature": "Il team {{project}}", "emails.recovery.subject": "Reimpostazione password", - "emails.recovery.hello": "Ciao {{name}}", + "emails.recovery.hello": "Ciao {{user}}", "emails.recovery.body": "Clicca questo link per reimpostare la tua password di {{project}}.", "emails.recovery.footer": "Se non hai richiesto la reimpostazione della password, puoi ignorare questo messaggio.", "emails.recovery.thanks": "Grazie", diff --git a/app/config/locale/translations/ja.json b/app/config/locale/translations/ja.json index 415c753f19..386a7e4870 100644 --- a/app/config/locale/translations/ja.json +++ b/app/config/locale/translations/ja.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s チーム", "emails.verification.subject": "アカウント認証", - "emails.verification.hello": "こんにちは{{name}}さん", + "emails.verification.hello": "こんにちは{{user}}さん", "emails.verification.body": "メールアドレスを有効化するためには下記リンクをクリックして下さい。", "emails.verification.footer": "このメールに心当たりが無い場合は破棄をお願いいたします。", "emails.verification.thanks": "ご利用いただきありがとうございます。", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ご利用いただきありがとうございます。", "emails.magicSession.signature": "{{project}}チーム", "emails.recovery.subject": "パスワードリセット", - "emails.recovery.hello": "こんにちは{{name}}さん", + "emails.recovery.hello": "こんにちは{{user}}さん", "emails.recovery.body": "パスワードをリセットするためには下記リンクをクリックしてください。", "emails.recovery.footer": "このメールに心当たりが無い場合は破棄をお願いいたします。", "emails.recovery.thanks": "ご利用いただきありがとうございます。", diff --git a/app/config/locale/translations/jv.json b/app/config/locale/translations/jv.json index 06990dfa9f..6af2a88443 100644 --- a/app/config/locale/translations/jv.json +++ b/app/config/locale/translations/jv.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Tim %s", "emails.verification.subject": "Verifikasi Akun", - "emails.verification.hello": "Hai {{name}}", + "emails.verification.hello": "Hai {{user}}", "emails.verification.body": "Klik link iki kanggo verifikasi alamat email sampeyan.", "emails.verification.footer": "Yen sampeyan ora njaluk verifikasi alamat iki, sampeyan iso nglirwakake pesen iki.", "emails.verification.thanks": "Matur nuwun", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Matur nuwun", "emails.magicSession.signature": "Tim {{project}}", "emails.recovery.subject": "Setel ulang sandi", - "emails.recovery.hello": "Halo {{name}}", + "emails.recovery.hello": "Halo {{user}}", "emails.recovery.body": "Klik link iki kanggo setel ulang sandi {{project}}.", "emails.recovery.footer": "Yen sampeyan ora njaluk setel ulang sandi, sampeyan iso nglirwakake pesen iki.", "emails.recovery.thanks": "Matur nuwun", diff --git a/app/config/locale/translations/kn.json b/app/config/locale/translations/kn.json index 1dfe029778..570b5ddf01 100644 --- a/app/config/locale/translations/kn.json +++ b/app/config/locale/translations/kn.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s ತಂಡ", "emails.verification.subject": "ಖಾತೆ ಪರಿಶೀಲನೆ", - "emails.verification.hello": "ನಮಸ್ಕಾರ {{name}}", + "emails.verification.hello": "ನಮಸ್ಕಾರ {{user}}", "emails.verification.body": "ನಿಮ್ಮ ಇಮೇಲ್ ವಿಳಾಸ ಪರಿಶೀಲನೆಗೆ ಈ ಲಿಂಕನ್ನು ಅನುಸರಿಸಿ", "emails.verification.footer": "ನೀವು ಇಮೇಲ್ ವಿಳಾಸ ಪರಿಶೀಲನೆಗೆ ಕೇಳದಿದ್ದರೆ, ಈ ಸಂದೇಶವನ್ನು ನಿರ್ಲಕ್ಷಿಸಿ", "emails.verification.thanks": "ಧನ್ಯವಾದಗಳು", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ಧನ್ಯವಾದಗಳು", "emails.magicSession.signature": "{{project}} ತಂಡ", "emails.recovery.subject": "ಗುಪ್ತಪದ ಮರುಹೊಂದಿಸಿ", - "emails.recovery.hello": "ನಮಸ್ಕಾರ {{name}}", + "emails.recovery.hello": "ನಮಸ್ಕಾರ {{user}}", "emails.recovery.body": "ನಿಮ್ಮ {{project}} ಗುಪ್ತಪದವನ್ನು ಮರುಹೊಂದಿಸಲು ಈ ಲಿಂಕನ್ನು ಅನುಸರಿಸಿ", "emails.recovery.footer": "ನೀವು ಗುಪ್ತಪದವನ್ನು ಮರುಹೊಂದಿಸಲು ಕೇಳದಿದ್ದರೆ, ಈ ಸಂದೇಶವನ್ನು ನಿರ್ಲಕ್ಷಿಸಿ", "emails.recovery.thanks": "ಧನ್ಯವಾದಗಳು", diff --git a/app/config/locale/translations/ko.json b/app/config/locale/translations/ko.json index 7478b45fbe..6bb67d3cc3 100644 --- a/app/config/locale/translations/ko.json +++ b/app/config/locale/translations/ko.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s 팀", "emails.verification.subject": "계정 인증", - "emails.verification.hello": "안녕하세요 {{name}}님", + "emails.verification.hello": "안녕하세요 {{user}}님", "emails.verification.body": "이메일 인증을 위해 링크를 클릭하여주세요.", "emails.verification.footer": "이메일 인증을 부탁하지 않으셨다면 이 메시지를 무시하여주세요.", "emails.verification.thanks": "감사합니다", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "감사합니다", "emails.magicSession.signature": "{{project}} 팀", "emails.recovery.subject": "비밀번호 재설정", - "emails.recovery.hello": "안녕하세요 {{name}}님", + "emails.recovery.hello": "안녕하세요 {{user}}님", "emails.recovery.body": "{{project}}의 비밀번호 재설정을 위해 링크를 클릭하여주세요.", "emails.recovery.footer": "비밀번호 재설정 신청을 하지 않으셨다면 이 메세지를 무시하여주세요.", "emails.recovery.thanks": "감사합니다", diff --git a/app/config/locale/translations/la.json b/app/config/locale/translations/la.json index ea2b276a39..0d766af60f 100644 --- a/app/config/locale/translations/la.json +++ b/app/config/locale/translations/la.json @@ -4,7 +4,7 @@ "settings.direction": "ltr*", "emails.sender": "%s team", "emails.verification.subject": "Ratio comprobatio", - "emails.verification.hello": "Salve ibi {{name}}", + "emails.verification.hello": "Salve ibi {{user}}", "emails.verification.body": "Sequere hanc nexum ut quin inscriptionem tuum.", "emails.verification.footer": "Si verificationem huius inscriptionis non postulasti, nuntium hunc ignorare potes.", "emails.verification.thanks": "Gratias", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Gratias", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Recuperet password", - "emails.recovery.hello": "Salve ibi {{name}}", + "emails.recovery.hello": "Salve ibi {{user}}", "emails.recovery.body": "Sequere hanc conjunctionem ut recipias project password {{project}}", "emails.recovery.footer": "Si tesseram tuam recuperare non petis, nuntium hunc ignorare potes", "emails.recovery.thanks": "Gratias", diff --git a/app/config/locale/translations/lb.json b/app/config/locale/translations/lb.json index d874d46a70..909887549d 100644 --- a/app/config/locale/translations/lb.json +++ b/app/config/locale/translations/lb.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Kont Verifikatioun", - "emails.verification.hello": "Hey {{name}}", + "emails.verification.hello": "Hey {{user}}", "emails.verification.body": "Follegt dëse Link fir Är E -Mail Adress z'iwwerpréiwen.", "emails.verification.footer": "Wann Dir net gefrot hutt dës Adress z'iwwerpréiwen, kënnt Dir dëse Message ignoréieren.", "emails.verification.thanks": "Merci", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Merci", "emails.magicSession.signature": "{{project}} équipe", "emails.recovery.subject": "Password Reset", - "emails.recovery.hello": "Hello {{name}}", + "emails.recovery.hello": "Hello {{user}}", "emails.recovery.body": "Follegt dëse Link fir Äert {{project}} Passwuert zréckzesetzen.", "emails.recovery.footer": "Wann Dir net gefrot hutt Äert Passwuert zréckzesetzen, kënnt Dir dëse Message ignoréieren.", "emails.recovery.thanks": "Merci", diff --git a/app/config/locale/translations/lt.json b/app/config/locale/translations/lt.json index ef836b0ab2..43c5edc947 100644 --- a/app/config/locale/translations/lt.json +++ b/app/config/locale/translations/lt.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s komanda", "emails.verification.subject": "Paskyros Patvirtinimas", - "emails.verification.hello": "Labas {{name}}", + "emails.verification.hello": "Labas {{user}}", "emails.verification.body": "Spauskite šią nuorodą, kad patvirtintumėte savo el. paštą.", "emails.verification.footer": "Jei neprašėte patvirtinti šio el. pašto, galite ignoruoti šį pranešimą.", "emails.verification.thanks": "Ačiū", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Ačiū", "emails.magicSession.signature": "{{project}} komanda", "emails.recovery.subject": "Slaptažodžio Atkūrimas", - "emails.recovery.hello": "Labas {{name}}", + "emails.recovery.hello": "Labas {{user}}", "emails.recovery.body": "Spauskite šią nuorodą, kad atkurtumėte projekto {{project}} slaptažodį.", "emails.recovery.footer": "Jei neprašėte atkurti savo slaptažodzio, galite ignoruoti šį pranešimą.", "emails.recovery.thanks": "Ačiū", diff --git a/app/config/locale/translations/lv.json b/app/config/locale/translations/lv.json index c5fe8533f4..c193296184 100644 --- a/app/config/locale/translations/lv.json +++ b/app/config/locale/translations/lv.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s komanda", "emails.verification.subject": "Konta verifikācija", - "emails.verification.hello": "Sveicināti, {{name}}", + "emails.verification.hello": "Sveicināti, {{user}}", "emails.verification.body": "Sekojiet saitei, lai apstiprinātu savu e-pasta adresi.", "emails.verification.footer": "Ja Jūs nepieprasījāt šīs adreses apstiprinājumu, lūdzu, ignorējiet šo ziņu.", "emails.verification.thanks": "Paldies", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Paldies", "emails.magicSession.signature": "{{project}} komanda", "emails.recovery.subject": "Paroles atjaunināšana", - "emails.recovery.hello": "Labdien, {{name}}", + "emails.recovery.hello": "Labdien, {{user}}", "emails.recovery.body": "Sekojiet saitei, lai atjauninātu {{project}} paroli.", "emails.recovery.footer": "Ja Jūs nepieprasījāt paroles atjaunināšanu, lūdzu, ignorējiet šo ziņu.", "emails.recovery.thanks": "Paldies", diff --git a/app/config/locale/translations/ml.json b/app/config/locale/translations/ml.json index 4997d0dfcd..ae5339f645 100644 --- a/app/config/locale/translations/ml.json +++ b/app/config/locale/translations/ml.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s ടീം", "emails.verification.subject": "അക്കൗണ്ട് സ്ഥിരീകരണം", - "emails.verification.hello": "നമസ്കാരം {{name}}", + "emails.verification.hello": "നമസ്കാരം {{user}}", "emails.verification.body": "നിങ്ങളുടെ ഇമെയിൽ വിലാസം സ്ഥിരീകരിക്കുന്നതിനായി ഈ ലിങ്ക് പിന്തുടരുക.", "emails.verification.footer": "ഈ വിലാസം സ്ഥിരീകരിക്കാന്‍ നിങ്ങൾ ആവശ്യപ്പെട്ടില്ലെങ്കിൽ, നിങ്ങൾക്ക് ഈ സന്ദേശം അവഗണിക്കാവുന്നതാണ്.", "emails.verification.thanks": "നന്ദി", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "നന്ദി", "emails.magicSession.signature": "{{project}} ടീം", "emails.recovery.subject": "രഹസ്യവാക്ക് പുനക്രമീകരണം", - "emails.recovery.hello": "നമസ്കാരം {{name}}", + "emails.recovery.hello": "നമസ്കാരം {{user}}", "emails.recovery.body": "നിങ്ങളുടെ {{Project}} രഹസ്യവാക്ക് പുനക്രമീകരിക്കുന്നതിന് ഈ ലിങ്ക് പിന്തുടരുക.", "emails.recovery.footer": "നിങ്ങളുടെ രഹസ്യവാക്ക് പുനക്രമീകരിക്കാന്‍ നിങ്ങൾ ആവശ്യപ്പെട്ടില്ലെങ്കിൽ, ഈ സന്ദേശം അവഗണിക്കാവുന്നതാണ്.", "emails.recovery.thanks": "നന്ദി", diff --git a/app/config/locale/translations/mr.json b/app/config/locale/translations/mr.json index 1b3adfe061..8f390a4ea0 100644 --- a/app/config/locale/translations/mr.json +++ b/app/config/locale/translations/mr.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s टीम", "emails.verification.subject": "खाते सत्यापन", - "emails.verification.hello": "नमस्कार {{name}}", + "emails.verification.hello": "नमस्कार {{user}}", "emails.verification.body": "आपला ईमेल पत्ता सत्यापित करण्यासाठी या दुव्याचे अनुसरण करा.", "emails.verification.footer": "आपण या पत्त्याची पडताळणी करण्यास सांगितले नसल्यास, आपण या संदेशाकडे दुर्लक्ष करू शकता.", "emails.verification.thanks": "धन्यवाद", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "धन्यवाद", "emails.magicSession.signature": "{{project}} संघ", "emails.recovery.subject": "पासवर्ड रीसेट", - "emails.recovery.hello": "नमस्कार {{name}}", + "emails.recovery.hello": "नमस्कार {{user}}", "emails.recovery.body": "आपला {{project}}चे पासवर्ड रीसेट करण्यासाठी या लिंकचे अनुसरण करा", "emails.recovery.footer": "आपण आपला पासवर्ड रीसेट करण्यास सांगितले नसल्यास, आपण या संदेशाकडे दुर्लक्ष करू शकता.", "emails.recovery.thanks": "धन्यवाद", diff --git a/app/config/locale/translations/ms.json b/app/config/locale/translations/ms.json index 23a302d684..b0543bcc13 100644 --- a/app/config/locale/translations/ms.json +++ b/app/config/locale/translations/ms.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Pengesahan Akaun", - "emails.verification.hello": "Hey {{name}}", + "emails.verification.hello": "Hey {{user}}", "emails.verification.body": "Tekan pautan ini untuk mengesahkan alamat email anda.", "emails.verification.footer": "Sekiranya anda tidak membuat permintaan untuk mengesahkan email ini, sila abaikan mesej ini.", "emails.verification.thanks": "Terima kasih", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Terima kasih", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Menetap semula Kata Laluan", - "emails.recovery.hello": "Hello {{name}}", + "emails.recovery.hello": "Hello {{user}}", "emails.recovery.body": "Tekan pautan ini untuk menetapkan semula kata laluan {{project}}.", "emails.recovery.footer": "Sekiranya anda tidak membuat permintaan menetap semula kata laluan, sila abaikan mesej ini.", "emails.recovery.thanks": "Terima kasih", diff --git a/app/config/locale/translations/nb.json b/app/config/locale/translations/nb.json index 06ea6f8413..4b747d3836 100644 --- a/app/config/locale/translations/nb.json +++ b/app/config/locale/translations/nb.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Kontobekreftelse", - "emails.verification.hello": "Hei {{name}}", + "emails.verification.hello": "Hei {{user}}", "emails.verification.body": "Følg denne lenken for å bekrefte din e-postadresse.", "emails.verification.footer": "Dersom du ikke ba om å bekrefte e-postadressen, kan du se bort fra denne meldingen.", "emails.verification.thanks": "Takk", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Takk", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Nullstille passord", - "emails.recovery.hello": "Hei {{name}}", + "emails.recovery.hello": "Hei {{user}}", "emails.recovery.body": "Følg denne lenken for å nullstille ditt {{project}} passord.", "emails.recovery.footer": "Dersom du ikke ba om å nullstille passordet ditt, kan du se bort fra denne meldingen.", "emails.recovery.thanks": "Takk", diff --git a/app/config/locale/translations/ne.json b/app/config/locale/translations/ne.json index 77de4c1541..a55c8a7f84 100644 --- a/app/config/locale/translations/ne.json +++ b/app/config/locale/translations/ne.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s समूह", "emails.verification.subject": "खाता प्रमाणिकरण", - "emails.verification.hello": "नमस्ते {{name}}", + "emails.verification.hello": "नमस्ते {{user}}", "emails.verification.body": "इमेल ठेगाना प्रमाणित गर्नको लागी यो लिंकमा जानुहोस।", "emails.verification.footer": "यदि तपाइँले आफ्नो खाता प्रमाणित गर्न सोध्नु भएको छैन भने तपाइँले यो सन्देश लाई बेवास्ता गर्न सक्नुहुन्छ।", "emails.verification.thanks": "धन्यवाद", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "धन्यवाद", "emails.magicSession.signature": "{{project}} समूह", "emails.recovery.subject": "पासवर्ड रिसेट", - "emails.recovery.hello": "नमस्ते {{name}}", + "emails.recovery.hello": "नमस्ते {{user}}", "emails.recovery.body": "{{project}}को पासवर्ड रिसेट गर्नको लागी यो लिंकमा जानुहोस।", "emails.recovery.footer": "यदि तपाइँले आफ्नो पासवर्ड रिसेट गर्न सोध्नु भएको छैन भने तपाइँले यो सन्देश लाई बेवास्ता गर्न सक्नुहुन्छ।", "emails.recovery.thanks": "धन्यवाद", diff --git a/app/config/locale/translations/nl.json b/app/config/locale/translations/nl.json index c41d3987bc..98a3999096 100644 --- a/app/config/locale/translations/nl.json +++ b/app/config/locale/translations/nl.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Account Verificatie", - "emails.verification.hello": "Hoi {{name}}", + "emails.verification.hello": "Hoi {{user}}", "emails.verification.body": "Volg deze link om uw e-mail te verifieren", "emails.verification.footer": "Als u geen aanvraag voor verificatie heeft gemaakt, kan u deze mail negeren", "emails.verification.thanks": "Bedankt", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Bedankt", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Wachtwoord Herinstellen", - "emails.recovery.hello": "Hallo {{name}}", + "emails.recovery.hello": "Hallo {{user}}", "emails.recovery.body": "Volg deze link om het wachtwoord van uw project {{project}} te wijzigen", "emails.recovery.footer": "Als u geen aanvraag heeft gemaakt om uw wachtwoord te wijzigen, kan u deze mail negeren", "emails.recovery.thanks": "Bedankt", diff --git a/app/config/locale/translations/nn.json b/app/config/locale/translations/nn.json index b87f14d8d1..6c40f1a514 100644 --- a/app/config/locale/translations/nn.json +++ b/app/config/locale/translations/nn.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Team", "emails.verification.subject": "Kontostadfesting", - "emails.verification.hello": "Hallo {{name}}", + "emails.verification.hello": "Hallo {{user}}", "emails.verification.body": "Følg denne lenkja for å bekrefta din e-postadresse.", "emails.verification.footer": "Om du ikkje bad om å bekrefta e-postadressa, kan du ignorera denne meldinga.", "emails.verification.thanks": "Takk", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Takk", "emails.magicSession.signature": "{{project}} team", "emails.recovery.subject": "Nullstilla passord", - "emails.recovery.hello": "Hallo {{name}}", + "emails.recovery.hello": "Hallo {{user}}", "emails.recovery.body": "Følg denne lenkja for å nullstilla ditt {{project}} passord.", "emails.recovery.footer": "Om du ikkje ba om å nullstilla passordet ditt, kan du ignorera denne meldinga.", "emails.recovery.thanks": "Takk", diff --git a/app/config/locale/translations/or.json b/app/config/locale/translations/or.json index fdf5c7ab34..26ede93c3a 100644 --- a/app/config/locale/translations/or.json +++ b/app/config/locale/translations/or.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s ଦଳ", "emails.verification.subject": "ଖାତା ଯାଞ୍ଚ", - "emails.verification.hello": "ନମସ୍କାର {{name}}", + "emails.verification.hello": "ନମସ୍କାର {{user}}", "emails.verification.body": "ଆପଣଙ୍କର ଇମେଲ୍ ଠିକଣା ଯାଞ୍ଚ କରିବାକୁ ଏହି ଲିଙ୍କ୍ ଅନୁସରଣ କରନ୍ତୁ |", "emails.verification.footer": "ଯଦି ଆପଣ ଏହି ଠିକଣା ଯାଞ୍ଚ କରିବାକୁ କହି ନାହାଁନ୍ତି, ତେବେ ଆପଣ ଏହି ସନ୍ଦେଶକୁ ଉପେକ୍ଷା କରିପାରିବେ |", "emails.verification.thanks": "ଧନ୍ୟବାଦ", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ଧନ୍ୟବାଦ", "emails.magicSession.signature": "{{project}} ଦଳ", "emails.recovery.subject": "ପାସୱାର୍ଡ ପୁନଃ ସେଟ୍ କରନ୍ତୁ |", - "emails.recovery.hello": "ନମସ୍କାର {{name}}", + "emails.recovery.hello": "ନମସ୍କାର {{user}}", "emails.recovery.body": "ଆପଣଙ୍କର {{project}} ପାସୱାର୍ଡ ପୁନଃ ସେଟ୍ କରିବାକୁ ଏହି ଲିଙ୍କକୁ ଅନୁସରଣ କରନ୍ତୁ |", "emails.recovery.footer": "ଯଦି ଆପଣ ଆପଣଙ୍କର ପାସୱାର୍ଡ ପୁନଃ ସେଟ୍ କରିବାକୁ କହି ନାହାଁନ୍ତି, ତେବେ ଆପଣ ଏହି ସନ୍ଦେଶକୁ ଉପେକ୍ଷା କରିପାରିବେ |", "emails.recovery.thanks": "ଧନ୍ୟବାଦ", diff --git a/app/config/locale/translations/pl.json b/app/config/locale/translations/pl.json index 86c3f73457..f351b8ce23 100644 --- a/app/config/locale/translations/pl.json +++ b/app/config/locale/translations/pl.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Zespół %s", "emails.verification.subject": "Weryfikacja konta", - "emails.verification.hello": "Cześć {{name}}", + "emails.verification.hello": "Cześć {{user}}", "emails.verification.body": "Przejdź do tego linku, aby zweryfikować swój adres e-mail.", "emails.verification.footer": "Jeśli to nie Ty prosiłeś o zweryfikowanie tego adresu, zignoruj tę wiadomość.", "emails.verification.thanks": "Dziękujemy", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Dziękujemy", "emails.magicSession.signature": "Zespół {{project}}", "emails.recovery.subject": "Resetowanie hasła", - "emails.recovery.hello": "Cześć {{name}}", + "emails.recovery.hello": "Cześć {{user}}", "emails.recovery.body": "Przejdź do tego linku, aby zresetować hasło dla {{project}}.", "emails.recovery.footer": "Jeśli to nie Ty prosiłeś o zresetowanie swojego hasła, zignoruj tę wiadomość.", "emails.recovery.thanks": "Dziękujemy", diff --git a/app/config/locale/translations/pt-br.json b/app/config/locale/translations/pt-br.json index 67590d3fe0..d19f374b67 100644 --- a/app/config/locale/translations/pt-br.json +++ b/app/config/locale/translations/pt-br.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Time %s", "emails.verification.subject": "Verificação da Conta", - "emails.verification.hello": "Olá {{name}}", + "emails.verification.hello": "Olá {{user}}", "emails.verification.body": "Clique neste link para verificar o seu endereço de e-mail.", "emails.verification.footer": "Se você não solicitou a verificação deste e-mail, ignore essa mensagem.", "emails.verification.thanks": "Muito obrigado", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Muito obrigado", "emails.magicSession.signature": "Time {{project}}", "emails.recovery.subject": "Redefinição de senha", - "emails.recovery.hello": "Olá {{name}}", + "emails.recovery.hello": "Olá {{user}}", "emails.recovery.body": "Clique neste link para redefinir sua senha do {{project}}.", "emails.recovery.footer": "Se você não solicitou a redefinição da sua senha, você pode ignorar essa mensagem.", "emails.recovery.thanks": "Muito obrigado", diff --git a/app/config/locale/translations/pt-pt.json b/app/config/locale/translations/pt-pt.json index cf9ef377a8..ef45a319a3 100644 --- a/app/config/locale/translations/pt-pt.json +++ b/app/config/locale/translations/pt-pt.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Equipa %s", "emails.verification.subject": "Verificação de contas", - "emails.verification.hello": "Hey {{name}}", + "emails.verification.hello": "Hey {{user}}", "emails.verification.body": "Siga esta ligação para verificar o seu endereço de correio electrónico.", "emails.verification.footer": "Se não pediu para verificar este endereço, pode ignorar esta mensagem.", "emails.verification.thanks": "Obrigado", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Obrigado", "emails.magicSession.signature": "Equipa {{project}}", "emails.recovery.subject": "Redefinição de senha", - "emails.recovery.hello": "Olá {{name}}", + "emails.recovery.hello": "Olá {{user}}", "emails.recovery.body": "Utilize este link para redefinir a palavra-passe do seu projecto {{project}}", "emails.recovery.footer": "Se não pediu para redefinir a sua palavra-passe, pode ignorar esta mensagem.", "emails.recovery.thanks": "Obrigado", diff --git a/app/config/locale/translations/ro.json b/app/config/locale/translations/ro.json index 9976359179..1a3515dc9d 100644 --- a/app/config/locale/translations/ro.json +++ b/app/config/locale/translations/ro.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Echipa", "emails.verification.subject": "Verificare cont", - "emails.verification.hello": "Bună ziua, {{name}}", + "emails.verification.hello": "Bună ziua, {{user}}", "emails.verification.body": "Click pe acest link pentru a valida adresa de email.", "emails.verification.footer": "Dacă nu ai cerut validarea adresei de email, poți ignora acest mesaj.", "emails.verification.thanks": "Mulțumim", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Mulțumim", "emails.magicSession.signature": "Echipa {{project}}", "emails.recovery.subject": "Resetare parolă", - "emails.recovery.hello": "Bună ziua, {{name}}", + "emails.recovery.hello": "Bună ziua, {{user}}", "emails.recovery.body": "Click aici pentru a reseta parola pentru {{project}}", "emails.recovery.footer": "Dacă nu ai cerut să îți schimbi parola, ignoră acest mesaj.", "emails.recovery.thanks": "Mulțumim", diff --git a/app/config/locale/translations/ru.json b/app/config/locale/translations/ru.json index 9221996715..112e320310 100644 --- a/app/config/locale/translations/ru.json +++ b/app/config/locale/translations/ru.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Команда %s", "emails.verification.subject": "Верификация аккаунта", - "emails.verification.hello": "Здравствуйте, {{name}}", + "emails.verification.hello": "Здравствуйте, {{user}}", "emails.verification.body": "Перейдите по ссылке, чтобы подтвердить свой адрес электронной почты.", "emails.verification.footer": "Если вы не запрашивали подтверждение этого адреса, проигнорируйте это сообщение.", "emails.verification.thanks": "Спасибо", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Спасибо", "emails.magicSession.signature": "команда {{project}}", "emails.recovery.subject": "Сброс пароля", - "emails.recovery.hello": "Здравствуйте, {{name}}", + "emails.recovery.hello": "Здравствуйте, {{user}}", "emails.recovery.body": "Перейдите по этой ссылке для того чтобы сбросить свой пароль для проекта {{project}}", "emails.recovery.footer": "Если вы не запрашивали сброс пароля, проигнорируйте это сообщение.", "emails.recovery.thanks": "Спасибо", diff --git a/app/config/locale/translations/sa.json b/app/config/locale/translations/sa.json index f77e5f5d4d..09c5f7a8d2 100644 --- a/app/config/locale/translations/sa.json +++ b/app/config/locale/translations/sa.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s गणः", "emails.verification.subject": "पञ्जिकानिर्णायनम्‌", - "emails.verification.hello": "अयि {{name}}", + "emails.verification.hello": "अयि {{user}}", "emails.verification.body": "ई-पत्रनिर्णायनार्थमिदं संयोगसूत्रमनुसरतु।", "emails.verification.footer": "यदि अस्य संकेतस्य निर्णायनं नेष्यते तर्हि वात्र्तामिमामुपेक्षताम्‌।", "emails.verification.thanks": "धन्यवादः", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "धन्यवादः", "emails.magicSession.signature": "{{project}} गणः", "emails.recovery.subject": "कूटशब्दपुनयाेजनम्‌", - "emails.recovery.hello": "अयि भो {{name}}", + "emails.recovery.hello": "अयि भो {{user}}", "emails.recovery.body": "{{project}} कूटशब्दपुनयाेजनाय संयोगमेनमनुसरतु।", "emails.recovery.footer": "यदि कूटशब्दस्य पुनयाेजनं नेष्यते तर्हि वात्र्तामिमामुपेक्षताम्‌।", "emails.recovery.thanks": "धन्यवादः", diff --git a/app/config/locale/translations/sd.json b/app/config/locale/translations/sd.json index c3aee50f5f..7961b64e4c 100644 --- a/app/config/locale/translations/sd.json +++ b/app/config/locale/translations/sd.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s ٽيم", "emails.verification.subject": " اڪائونٽ جي تصديق", - "emails.verification.hello": "سلام {{name}}", + "emails.verification.hello": "سلام {{user}}", "emails.verification.body": "پنھنجي اي ميل ايڊريس جي تصديق ڪرڻ لاءِ ھن لنڪ تي عمل ڪريو.", "emails.verification.footer": "جيڪڏھن توھان نه پ askيا ھئا ھن ايڊريس جي تصديق ڪرڻ لاءِ ، توھان نظر انداز ڪري سگھوٿا ھن پيغام کي.", "emails.verification.thanks": "مهرباني", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "مهرباني", "emails.magicSession.signature": "{{project}} ٽيم", "emails.recovery.subject": "پاسورڊ ري سيٽ", - "emails.recovery.hello": "هيلو {{name}}", + "emails.recovery.hello": "هيلو {{user}}", "emails.recovery.body": "ھن لنڪ تي عمل ڪريو پنھنجو {{project}} پاسورڊ ري سيٽ ڪرڻ لاءِ.", "emails.recovery.footer": "جيڪڏھن توھان نه پ پيو ھو پنھنجي پاسورڊ کي ري سيٽ ڪرڻ لاءِ ، توھان نظر انداز ڪري سگھوٿا ھن پيغام کي.", "emails.recovery.thanks": "مهرباني", diff --git a/app/config/locale/translations/si.json b/app/config/locale/translations/si.json index 0253a9420c..b10240d77d 100644 --- a/app/config/locale/translations/si.json +++ b/app/config/locale/translations/si.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s කණ්ඩායම", "emails.verification.subject": "ගිණුම් සත්‍යාපනය", - "emails.verification.hello": "හේයි {{name}}", + "emails.verification.hello": "හේයි {{user}}", "emails.verification.body": "ඔබගේ විද්‍යුත් තැපැල් ලිපිනය සත්‍යාපනය කිරීමට මෙම සම්බන්ධකය අනුගමනය කරන්න.", "emails.verification.footer": "මෙම ලිපිනය සත්‍යාපනය කරන ලෙස ඔබ ඉල්ලුවේ නැත්නම්, ඔබට මෙම පණිවිඩය නොසලකා හැරිය හැක.", "emails.verification.thanks": "ස්තුතියි", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ස්තුතියි", "emails.magicSession.signature": "{{project}} කණ්ඩායම", "emails.recovery.subject": "මුරපද යළි පිහිටුවීම", - "emails.recovery.hello": "ආයුබෝවන් {{name}}", + "emails.recovery.hello": "ආයුබෝවන් {{user}}", "emails.recovery.body": "ඔබගේ {{project}} මුරපදය නැවත සැකසීමට මෙම සම්බන්ධකය අනුගමනය කරන්න.", "emails.recovery.footer": "ඔබගේ මුරපදය නැවත සකසන ලෙස ඔබ ඉල්ලුවේ නැත්නම්, ඔබට මෙම පණිවිඩය නොසලකා හැරිය හැක.", "emails.recovery.thanks": "ස්තුතියි", diff --git a/app/config/locale/translations/sk.json b/app/config/locale/translations/sk.json index b891e4e3a3..a5468ddd6d 100644 --- a/app/config/locale/translations/sk.json +++ b/app/config/locale/translations/sk.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s Tím", "emails.verification.subject": "Overenie účtu", - "emails.verification.hello": "Ahoj {{name}}", + "emails.verification.hello": "Ahoj {{user}}", "emails.verification.body": "Použi tento link pre overenie svojej emailovej adresy.", "emails.verification.footer": "Ak si nepožiadal o overenie tejto adresy, môžeš túto správu ignorovať.", "emails.verification.thanks": "Ďakujeme.", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Ďakujeme", "emails.magicSession.signature": "{{project}} tím", "emails.recovery.subject": "Obnovenie hesla", - "emails.recovery.hello": "Ahoj {{name}}", + "emails.recovery.hello": "Ahoj {{user}}", "emails.recovery.body": "Použi tento link pre obnovenie svojho {{project}} hesla.", "emails.recovery.footer": "Ak si nepožiadal o obnovu svojho hesla, túto správu môžeš ignorovať.", "emails.recovery.thanks": "Ďakujeme", diff --git a/app/config/locale/translations/sn.json b/app/config/locale/translations/sn.json index 9d87509e9a..07c00bc29b 100644 --- a/app/config/locale/translations/sn.json +++ b/app/config/locale/translations/sn.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Chikwata che%s", "emails.verification.subject": "Kuratidzi kuti ndiwe muridzi weakaundi", - "emails.verification.hello": "Hesi {{name}}", + "emails.verification.hello": "Hesi {{user}}", "emails.verification.body": "Tevedza chinongedzo ichi kuti uratidze kuti kero iyi ndeyako.", "emails.verification.footer": "Kana usina kukumbira kuti uratidze kuti kero iyi ndeyako, unogona kufuratira meseji iyi.", "emails.verification.thanks": "Ndatenda", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Ndatenda", "emails.magicSession.signature": "Chikwata che{{project}}", "emails.recovery.subject": "Kuchinja pasiwedhi", - "emails.recovery.hello": "Mhoro {{name}}", + "emails.recovery.hello": "Mhoro {{user}}", "emails.recovery.body": "Baya chinongedzo ichi kuti uchinje pasiwedhi yako ye{{project}}.", "emails.recovery.footer": "Kana usina kukumbira kuchinja pasiwedhi yako, unogona kufuratira meseji iyi.", "emails.recovery.thanks": "Ndatenda", diff --git a/app/config/locale/translations/sv.json b/app/config/locale/translations/sv.json index eecca99a55..751fd292a3 100644 --- a/app/config/locale/translations/sv.json +++ b/app/config/locale/translations/sv.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s-teamet", "emails.verification.subject": "Verifiera konto", - "emails.verification.hello": "Hej {{name}}", + "emails.verification.hello": "Hej {{user}}", "emails.verification.body": "Klicka på denna länk för att verifiera din email", "emails.verification.footer": "Om du inte bad om att verifiera den här e-postadressen kan du ignorera detta mail.", "emails.verification.thanks": "Tack", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Tack", "emails.magicSession.signature": "{{project}} teamet", "emails.recovery.subject": "Återställ lösenord", - "emails.recovery.hello": "Hej {{name}}", + "emails.recovery.hello": "Hej {{user}}", "emails.recovery.body": "Klicka på denna länk för att återställa lösenordet på {{project}}", "emails.recovery.footer": "Om du inte bad om att återställa ditt lösenord kan du ignorera detta mail.", "emails.recovery.thanks": "Tack", diff --git a/app/config/locale/translations/ta.json b/app/config/locale/translations/ta.json index 8555a00bf1..5cc09bd9fa 100644 --- a/app/config/locale/translations/ta.json +++ b/app/config/locale/translations/ta.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s குழு", "emails.verification.subject": "கணக்கு சரிபார்ப்பு", - "emails.verification.hello": "ஏய் {{name}}", + "emails.verification.hello": "ஏய் {{user}}", "emails.verification.body": "உங்கள் மின்னஞ்சல் முகவரியைச் சரிபார்க்க இந்த இணைப்பைப் பின்தொடரவும்.", "emails.verification.footer": "இந்த முகவரியைச் சரிபார்க்கும்படி உங்களிடம் கேட்கப்படவில்லை என்றால், இந்தச் செய்தியை நீங்கள் புறக்கணிக்கலாம்.", "emails.verification.thanks": "நன்றி", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "நன்றி", "emails.magicSession.signature": "{{project}} குழு", "emails.recovery.subject": "கடவுச்சொல் மீட்டமைப்பு", - "emails.recovery.hello": "வணக்கம் {{name}}", + "emails.recovery.hello": "வணக்கம் {{user}}", "emails.recovery.body": "மீட்டமைக்க இந்த இணைப்பைப் பின்தொடரவும் {{project}} கடவுச்சொல்.", "emails.recovery.footer": "உங்கள் கடவுச்சொல்லை மீட்டமைக்கும்படி உங்களிடம் கேட்கப்படவில்லை என்றால், இந்தச் செய்தியை நீங்கள் புறக்கணிக்கலாம்.", "emails.recovery.thanks": "நன்றி", diff --git a/app/config/locale/translations/te.json b/app/config/locale/translations/te.json index e9c2a6636a..7cc5cf607b 100644 --- a/app/config/locale/translations/te.json +++ b/app/config/locale/translations/te.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s జట్టు", "emails.verification.subject": "ఖాతా ధృవీకరణ", - "emails.verification.hello": "నమస్కారము {{name}}", + "emails.verification.hello": "నమస్కారము {{user}}", "emails.verification.body": "ఈ లింక్ ద్వారా ఇమెయిల్ ని ధృవీకరించండి", "emails.verification.footer": "మీరు ఈ చిరునామాను ధృవీకరించమని అడగనట్లయితే, మీరు ఈ సందేశాన్ని విస్మరించవచ్చు", "emails.verification.thanks": "ధన్యవాదాలు", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ధన్యవాదాలు", "emails.magicSession.signature": "{{project}} జట్", "emails.recovery.subject": "పాస్వర్డ్ రీసెట్", - "emails.recovery.hello": "నమస్కారమ {{name}}", + "emails.recovery.hello": "నమస్కారమ {{user}}", "emails.recovery.body": "మీ {{project}} పాస్వర్డ్ ని రీసెట్ చేయడానికి ఈ లింక్ ని అనుసరించండి", "emails.recovery.footer": "మీరు మీ పాస్వర్డ్ ని రీసెట్ చేయమని అడగనట్లయితే, మీరు ఈ సందేశాన్ని విస్మరించవచ్చు", "emails.recovery.thanks": "ధన్యవాదాల", diff --git a/app/config/locale/translations/th.json b/app/config/locale/translations/th.json index 62b8f17cdb..750c173e80 100644 --- a/app/config/locale/translations/th.json +++ b/app/config/locale/translations/th.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "ทีม %s", "emails.verification.subject": "การยืนยันบัญชีผู้ใช้", - "emails.verification.hello": "เรียนคุณ {{name}}", + "emails.verification.hello": "เรียนคุณ {{user}}", "emails.verification.body": "กดเข้าไปที่ลิงก์นี้เพื่อยืนยันอีเมลของท่าน", "emails.verification.footer": "หากท่านไม่ได้ต้องการที่จะยืนยันอีเมลนี้ ท่านสามารถเพิกเฉยข้อความนี้ได้", "emails.verification.thanks": "ขอบคุณ", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "ขอบคุณ", "emails.magicSession.signature": "ทีม {{project}}", "emails.recovery.subject": "รีเซ็ตรหัสผ่าน", - "emails.recovery.hello": "เรียนคุณ {{name}}", + "emails.recovery.hello": "เรียนคุณ {{user}}", "emails.recovery.body": "กดเข้าไปที่ลิงก์นี้เพื่อรีเซ็ตรหัสผ่านสำหรับโปรเจกต์ {{project}} ของท่าน", "emails.recovery.footer": "หากท่านไม่ได้ต้องการที่จะรีเซ็ตรหัสผ่านของท่าน ท่านสามารถเพิกเฉยข้อความนี้ได้", "emails.recovery.thanks": "ขอบคุณ", diff --git a/app/config/locale/translations/tl.json b/app/config/locale/translations/tl.json index 5c88e4cf69..5e45857bfd 100644 --- a/app/config/locale/translations/tl.json +++ b/app/config/locale/translations/tl.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Pangkat ng %s", "emails.verification.subject": "Pagpapatunay ng account", - "emails.verification.hello": "Kamusta {{name}}", + "emails.verification.hello": "Kamusta {{user}}", "emails.verification.body": "Sundin ang link na ito upang ma-verify ang iyong email address.", "emails.verification.footer": "Kung hindi mo hiningi na i-verify ang address na ito, maaari mong balewalain ang mensahe na ito.", "emails.verification.thanks": "Salamat", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Salamat", "emails.magicSession.signature": "Pangkat ng {{project}}", "emails.recovery.subject": "I-reset ang password", - "emails.recovery.hello": "Kamusta {{name}}", + "emails.recovery.hello": "Kamusta {{user}}", "emails.recovery.body": "Sundin ang link na ito upang i-reset ang password ng iyong {{project}}.", "emails.recovery.footer": "Kung hindi mo hiningi na i-reset ang iyong password, maaari mong balewalain ang mensahe na ito.", "emails.recovery.thanks": "Salamat", diff --git a/app/config/locale/translations/uk.json b/app/config/locale/translations/uk.json index ed87f08467..b8269afc1f 100644 --- a/app/config/locale/translations/uk.json +++ b/app/config/locale/translations/uk.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Команда %s", "emails.verification.subject": "Верифікація акаунта", - "emails.verification.hello": "Вітаємо, {{name}}", + "emails.verification.hello": "Вітаємо, {{user}}", "emails.verification.body": "Перейдіть за цим посиланням, щоб підтвердити свою електронну адресу.", "emails.verification.footer": "Якщо ви не запитували підтвердження цієї адреси, ви можете ігнорувати це повідомлення.", "emails.verification.thanks": "Дякуємо", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Дякуємо", "emails.magicSession.signature": "команда {{project}}", "emails.recovery.subject": "Скидання пароля", - "emails.recovery.hello": "Вітаємо, {{name}}", + "emails.recovery.hello": "Вітаємо, {{user}}", "emails.recovery.body": "Перейдіть за цим посиланням для того щоб скинути свій пароль для проекту {{project}}", "emails.recovery.footer": "Якщо ви не запитували скидання паролю, проігноруйте це повідомлення.", "emails.recovery.thanks": "Дякуємо", diff --git a/app/config/locale/translations/ur.json b/app/config/locale/translations/ur.json index 4d92add049..6f769fc604 100644 --- a/app/config/locale/translations/ur.json +++ b/app/config/locale/translations/ur.json @@ -4,7 +4,7 @@ "settings.direction": "rtl", "emails.sender": "%s ٹیم", "emails.verification.subject": "اکاؤنٹ کی تصدیق", - "emails.verification.hello": "خوش آمدید {{name}}", + "emails.verification.hello": "خوش آمدید {{user}}", "emails.verification.body": "براہ کرم اپنے ای میل کی تصدیق کے لیے درج ذیل لنک پر عمل کریں۔", "emails.verification.footer": "اگر آپ نے اس پتے کی تصدیق کے لیے نہیں کہا تو آپ اس پیغام کو نظر انداز کر سکتے ہیں۔", "emails.verification.thanks": "شکریہ", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "شکریہ", "emails.magicSession.signature": "ٹیم۔ {{project}}", "emails.recovery.subject": "پاس ورڈ ری سیٹ۔", - "emails.recovery.hello": "ہیلو {{name}}", + "emails.recovery.hello": "ہیلو {{user}}", "emails.recovery.body": "{{project}} کا پاس ورڈ تبدیل کرنے کے لیے درج ذیل لنک پر عمل کریں", "emails.recovery.footer": "اگر آپ نے اپنا پاس ورڈ دوبارہ ترتیب دینے کے لیے نہیں کہا تو آپ اس پیغام کو نظر انداز کر سکتے ہیں۔", "emails.recovery.thanks": "شکریہ", diff --git a/app/config/locale/translations/vi.json b/app/config/locale/translations/vi.json index 8c72832d2f..3d946fcde4 100644 --- a/app/config/locale/translations/vi.json +++ b/app/config/locale/translations/vi.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "Nhóm %s", "emails.verification.subject": "Xác minh tài khoản", - "emails.verification.hello": "Chào {{name}}", + "emails.verification.hello": "Chào {{user}}", "emails.verification.body": "Nhấn vào đường dẫn sau để xác minh địa chỉ email của bạn.", "emails.verification.footer": "Nếu bạn không yêu cầu xác minh tài khoản, bạn có thể bỏ qua email này.", "emails.verification.thanks": "Cảm ơn", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "Cảm ơn", "emails.magicSession.signature": "Nhóm {{project}}", "emails.recovery.subject": "Thiết lập lại mật khẩu", - "emails.recovery.hello": "Chào {{name}}", + "emails.recovery.hello": "Chào {{user}}", "emails.recovery.body": "Nhấn vào đường dẫn sau để thiết lập lại mật khẩu {{project}} của bạn.", "emails.recovery.footer": "Nếu bạn không yêu cầu thiết lập lại mật khẩu, bạn có thể bỏ qua email này.", "emails.recovery.thanks": "Cảm ơn", diff --git a/app/config/locale/translations/zh-cn.json b/app/config/locale/translations/zh-cn.json index fa997c07f6..289f40dd74 100644 --- a/app/config/locale/translations/zh-cn.json +++ b/app/config/locale/translations/zh-cn.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s 小组", "emails.verification.subject": "帐户验证", - "emails.verification.hello": "你好 {{name}}", + "emails.verification.hello": "你好 {{user}}", "emails.verification.body": "点此链接验证您的电子邮件地址。", "emails.verification.footer": "如果您没有要求验证此地址,则可忽略此消息。", "emails.verification.thanks": "谢谢", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "谢谢", "emails.magicSession.signature": "{{project}} 团队", "emails.recovery.subject": "重设密码", - "emails.recovery.hello": "你好 {{name}}", + "emails.recovery.hello": "你好 {{user}}", "emails.recovery.body": "点此链接重置您的 {{project}} 密码。", "emails.recovery.footer": "如果您没有要求重置密码,则可以忽略此消息。", "emails.recovery.thanks": "谢谢", diff --git a/app/config/locale/translations/zh-tw.json b/app/config/locale/translations/zh-tw.json index 5d3e7141fb..67282e7591 100644 --- a/app/config/locale/translations/zh-tw.json +++ b/app/config/locale/translations/zh-tw.json @@ -4,7 +4,7 @@ "settings.direction": "ltr", "emails.sender": "%s 小組", "emails.verification.subject": "帳戶驗證", - "emails.verification.hello": "嗨 {{name}}", + "emails.verification.hello": "嗨 {{user}}", "emails.verification.body": "按照此連結驗證您的電子郵件地址。", "emails.verification.footer": "如果您沒有要求驗證此地址,則可以忽略此消息。", "emails.verification.thanks": "謝謝", @@ -16,7 +16,7 @@ "emails.magicSession.thanks": "謝謝", "emails.magicSession.signature": "{{project}} 團隊", "emails.recovery.subject": "重設密碼", - "emails.recovery.hello": "您好 {{name}}", + "emails.recovery.hello": "您好 {{user}}", "emails.recovery.body": "按照此連結重置您的 {{project}} 密碼。", "emails.recovery.footer": "如果您沒有要求重置密碼,則可以忽略此消息。", "emails.recovery.thanks": "謝謝", diff --git a/app/config/platforms.php b/app/config/platforms.php index 56103fad4a..6efaa3b50d 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -15,7 +15,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '11.0.0', + 'version' => '12.0.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -63,7 +63,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '9.0.0', + 'version' => '10.0.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -81,7 +81,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '2.0.0', + 'version' => '3.0.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '2.0.0', + 'version' => '3.0.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -185,7 +185,7 @@ return [ [ 'key' => 'web', 'name' => 'Console', - 'version' => '0.1.0', + 'version' => '0.3.0', 'url' => 'https://github.com/appwrite/sdk-for-console', 'package' => '', 'enabled' => true, @@ -203,7 +203,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '2.0.2', + 'version' => '3.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -231,7 +231,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '9.0.0', + 'version' => '10.0.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -249,7 +249,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '7.0.0', + 'version' => '8.0.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -267,7 +267,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '8.0.0', + 'version' => '9.0.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -285,7 +285,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '2.0.2', + 'version' => '3.0.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -303,7 +303,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '8.0.0', + 'version' => '9.0.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -357,7 +357,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.4.2', + 'version' => '0.5.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -375,7 +375,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '8.0.0', + 'version' => '9.0.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -393,7 +393,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '2.0.0', + 'version' => '3.0.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -415,7 +415,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '2.0.0', + 'version' => '3.0.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/providers.php b/app/config/providers.php index dedb4ec665..6ba54f28e4 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -1,6 +1,7 @@ [ 'name' => 'Amazon', 'developers' => 'https://developer.amazon.com/apps-and-games/services-and-apis', diff --git a/app/config/roles.php b/app/config/roles.php index f0039841d2..abc00b55bf 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -3,6 +3,7 @@ use Appwrite\Auth\Auth; $member = [ + 'global', 'public', 'home', 'console', @@ -23,6 +24,7 @@ $member = [ ]; $admins = [ + 'global', 'graphql', 'teams.read', 'teams.write', @@ -51,6 +53,13 @@ $admins = [ 'functions.write', 'execution.read', 'execution.write', + 'rules.read', + 'rules.write', + 'migrations.read', + 'migrations.write', + 'vcs.read', + 'vcs.write', + 'assistant.read', ]; return [ @@ -72,22 +81,22 @@ return [ ], Auth::USER_ROLE_USERS => [ 'label' => 'Users', - 'scopes' => \array_merge($member, []), + 'scopes' => \array_merge($member), ], Auth::USER_ROLE_ADMIN => [ 'label' => 'Admin', - 'scopes' => \array_merge($admins, []), + 'scopes' => \array_merge($admins), ], Auth::USER_ROLE_DEVELOPER => [ 'label' => 'Developer', - 'scopes' => \array_merge($admins, []), + 'scopes' => \array_merge($admins), ], Auth::USER_ROLE_OWNER => [ 'label' => 'Owner', - 'scopes' => \array_merge($member, $admins, []), + 'scopes' => \array_merge($member, $admins), ], Auth::USER_ROLE_APPS => [ 'label' => 'Applications', - 'scopes' => ['health.read', 'graphql'], + 'scopes' => ['global', 'health.read', 'graphql'], ], ]; diff --git a/app/config/runtimes.php b/app/config/runtimes.php index c24aaa109e..2cd73c1b70 100644 --- a/app/config/runtimes.php +++ b/app/config/runtimes.php @@ -7,7 +7,7 @@ use Utopia\App; use Appwrite\Runtimes\Runtimes; -$runtimes = new Runtimes('v2'); +$runtimes = new Runtimes('v3'); $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); diff --git a/app/config/scopes.php b/app/config/scopes.php index f62090cdd5..ddc1de21f3 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -106,4 +106,25 @@ return [ // List of publicly visible scopes 'targets.write' => [ 'description' => 'Access to create, update, and delete your project\'s targets', ], + 'rules.read' => [ + 'description' => 'Access to read your project\'s proxy rules', + ], + 'rules.write' => [ + 'description' => 'Access to create, update, and delete your project\'s proxy rules', + ], + 'migrations.read' => [ + 'description' => 'Access to read your project\'s migrations', + ], + 'migrations.write' => [ + 'description' => 'Access to create, update, and delete your project\'s migrations.', + ], + 'vcs.read' => [ + 'description' => 'Access to read your project\'s VCS repositories', + ], + 'vcs.write' => [ + 'description' => 'Access to create, update, and delete your project\'s VCS repositories', + ], + 'assistant.read' => [ + 'description' => 'Access to read the Assistant service', + ], ]; diff --git a/app/config/services.php b/app/config/services.php index f76c46b013..3700af659a 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -160,6 +160,19 @@ return [ 'optional' => true, 'icon' => '/images/services/users.png', ], + 'vcs' => [ + 'key' => 'vcs', + 'name' => 'VCS', + 'subtitle' => 'The VCS service allows you to interact with providers like GitHub, GitLab etc.', + 'description' => '', + 'controller' => 'api/vcs.php', + 'sdk' => false, + 'docs' => false, + 'docsUrl' => '', + 'tests' => false, + 'optional' => true, + 'icon' => '', + ], 'functions' => [ 'key' => 'functions', 'name' => 'Functions', @@ -173,6 +186,19 @@ return [ 'optional' => true, 'icon' => '/images/services/functions.png', ], + 'proxy' => [ + 'key' => 'proxy', + 'name' => 'Proxy', + 'subtitle' => 'The Proxy Service allows you to configure actions for your domains beyond DNS configuration.', + 'description' => '/docs/services/proxy.md', + 'controller' => 'api/proxy.php', + 'sdk' => true, + 'docs' => true, + 'docsUrl' => 'https://appwrite.io/docs/proxy', + 'tests' => false, + 'optional' => true, + 'icon' => '/images/services/proxy.png', + ], 'mock' => [ 'key' => 'mock', 'name' => 'Mock', @@ -212,4 +238,17 @@ return [ 'optional' => false, 'icon' => '', ], + 'migrations' => [ + 'key' => 'migrations', + 'name' => 'Migrations', + 'subtitle' => 'The Migrations service allows you to migrate third-party data to your Appwrite project.', + 'description' => '/docs/services/migrations.md', + 'controller' => 'api/migrations.php', + 'sdk' => true, + 'docs' => true, + 'docsUrl' => 'https://appwrite.io/docs/migrations', + 'tests' => true, + 'optional' => true, + 'icon' => '/images/services/migrations.png', + ], ]; diff --git a/app/config/specs/open-api3-1.4.x-client.json b/app/config/specs/open-api3-1.4.x-client.json index 91759a2ed8..f3e8254dde 100644 --- a/app/config/specs/open-api3-1.4.x-client.json +++ b/app/config/specs/open-api3-1.4.x-client.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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, statusCode, duration","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}}},"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":"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":[]}],"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"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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,"schema":{"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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"schema":{"type":"string","x-example":"[IDENTITY_ID]"},"in":"path"}]}},"\/account\/jwt":{"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":20,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":19,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":15,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":16,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":17,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":18,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","x-example":"{}"}}}}}}}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}}},"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":[]}],"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"]},"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"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-1.4.x-console.json b/app/config/specs/open-api3-1.4.x-console.json index 127a83be89..fd8212e58e 100644 --- a/app/config/specs/open-api3-1.4.x-console.json +++ b/app/config/specs/open-api3-1.4.x-console.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `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. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","x-example":"[CODE]"}},"required":["userId","email","password"]}}}}}},"\/account\/jwt":{"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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/console\/variables":{"get":{"summary":"Get Variables","operationId":"consoleVariables","tags":["console"],"description":"Get all Environment Variables that are relevant for the console.","responses":{"200":{"description":"Console Variables","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/consoleVariables"}}}}},"x-appwrite":{"method":"variables","weight":274,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","x-example":false}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":94,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","weight":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","weight":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","weight":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","weight":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","weight":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"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"}},"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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","weight":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","weight":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}}}}}}}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":91,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":58,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":96,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database 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":52,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":95,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"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?","x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":226,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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, statusCode, duration","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","weight":225,"cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":120,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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 Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":119,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"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.","x-example":null},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"region":{"type":"string","description":"Project Region.","x-example":"default"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":121,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":122,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":134,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/max-sessions":{"patch":{"summary":"Update Project user sessions limit","operationId":"projectsUpdateAuthSessionsLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthSessionsLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10","x-example":1}},"required":["limit"]}}}}}},"\/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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","weight":131,"cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to enable checking user's password against most commonly used passwords. Default is false.","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordHistory","weight":130,"cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of 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","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updatePersonalDataCheck","weight":132,"cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to check a password for similarity with personal data. Default is false.","x-example":false}},"required":["enabled"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":129,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":152,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":151,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":153,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":155,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":154,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":142,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":141,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":143,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":144,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":145,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":147,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":146,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":148,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":149,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":124,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/service\/all":{"patch":{"summary":"Update all service status","operationId":"projectsUpdateServiceStatusAll","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatusAll","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/smtp":{"patch":{"summary":"Update SMTP configuration","operationId":"projectsUpdateSmtpConfiguration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateSmtpConfiguration","weight":156,"cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable custom SMTP service","x-example":false},"sender":{"type":"string","description":"SMTP sender email","x-example":"email@example.com"},"host":{"type":"string","description":"SMTP server host name","x-example":null},"port":{"type":"integer","description":"SMTP server port","x-example":null},"username":{"type":"string","description":"SMTP server username","x-example":"[USERNAME]"},"password":{"type":"string","description":"SMTP server password","x-example":"[PASSWORD]"},"secure":{"type":"string","description":"Does SMTP server use secure connection","x-example":"tls"}},"required":["enabled","sender","host","port","username","password"]}}}}}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateTeam","weight":123,"cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID of the team to transfer project to.","x-example":"[TEAM_ID]"}},"required":["teamId"]}}}}}},"\/projects\/{projectId}\/templates\/email\/{type}\/{locale}":{"get":{"summary":"Get custom email template","operationId":"projectsGetEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"getEmailTemplate","weight":158,"cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification"},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateEmailTemplate","weight":160,"cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification"},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"senderName":{"type":"string","description":"Name of the email sender","x-example":"[SENDER_NAME]"},"senderEmail":{"type":"string","description":"Email of the sender","x-example":"email@example.com"},"subject":{"type":"string","description":"Email Subject","x-example":"[SUBJECT]"},"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"},"replyTo":{"type":"string","description":"Reply to email","x-example":"email@example.com"}},"required":["senderName","senderEmail","subject","message"]}}}}},"delete":{"summary":"Reset custom email template","operationId":"projectsDeleteEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"deleteEmailTemplate","weight":162,"cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification"},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"}]}},"\/projects\/{projectId}\/templates\/sms\/{type}\/{locale}":{"get":{"summary":"Get custom SMS template","operationId":"projectsGetSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"getSmsTemplate","weight":157,"cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification"},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"updateSmsTemplate","weight":159,"cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification"},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"}},"required":["message"]}}}}},"delete":{"summary":"Reset custom SMS template","operationId":"projectsDeleteSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"deleteSmsTemplate","weight":161,"cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification"},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":136,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":135,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":137,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":140,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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"},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permissions":{"type":"array","description":"An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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"},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":177,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":192,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":220,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","description":"Array of user labels. Replaces the previous labels. Maximum of 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":"+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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":"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":[]}],"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"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"]},"account":{"description":"Account","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"},"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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","accessedAt"]},"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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":[{}]},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"smtpEnabled":{"type":"boolean","description":"Status for custom SMTP","x-example":false},"smtpSender":{"type":"string","description":"SMTP sender email","x-example":"john@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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL 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","providers","platforms","webhooks","keys","domains","smtpEnabled","smtpSender","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions","serviceStatusForGraphql"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain 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"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","filesStorage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]},"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"}},"required":["_APP_DOMAIN_TARGET","_APP_STORAGE_LIMIT","_APP_FUNCTIONS_SIZE_LIMIT","_APP_USAGE_STATS"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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","cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/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","cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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,"schema":{"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"schema":{"type":"string","x-example":"[IDENTITY_ID]"},"in":"path"}]}},"\/account\/jwt":{"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","cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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","cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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","cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"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","cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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","cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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","cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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","cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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","cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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","cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/console\/assistant":{"post":{"summary":"Ask Query","operationId":"assistantChat","tags":["assistant"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"chat","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Prompt. A string containing questions asked to the AI assistant.","x-example":"[PROMPT]"}},"required":["prompt"]}}}}}},"\/console\/variables":{"get":{"summary":"Get Variables","operationId":"consoleVariables","tags":["console"],"description":"Get all Environment Variables that are relevant for the console.","responses":{"200":{"description":"Console Variables","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/consoleVariables"}}}}},"x-appwrite":{"method":"variables","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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","cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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]","x-global":true},"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\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/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","cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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","cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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","cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}}}}},"\/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","cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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](\/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","cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","x-example":"[TEMPLATE_BRANCH]"}},"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","cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/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","cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"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]"}},"required":["name","runtime"]}}}}},"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","cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","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](\/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","cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"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","cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","tags":["functions"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"downloadDeployment","cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/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","cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","x-example":"{}"}}}}}}}},"\/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","cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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","cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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","cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/migrations":{"get":{"summary":"List Migrations","operationId":"migrationsList","tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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, resources, statusCounters, resourceData, errors","required":false,"schema":{"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"}]}},"\/migrations\/appwrite":{"post":{"summary":"Migrate Appwrite Data","operationId":"migrationsCreateAppwriteMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createAppwriteMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"endpoint":{"type":"string","description":"Source's Appwrite Endpoint","x-example":"https:\/\/example.com"},"projectId":{"type":"string","description":"Source's Project ID","x-example":"[PROJECT_ID]"},"apiKey":{"type":"string","description":"Source's API Key","x-example":"[API_KEY]"}},"required":["resources","endpoint","projectId","apiKey"]}}}}}},"\/migrations\/appwrite\/report":{"get":{"summary":"Generate a report on Appwrite Data","operationId":"migrationsGetAppwriteReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getAppwriteReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"endpoint","description":"Source's Appwrite Endpoint","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"projectID","description":"Source's Project ID","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"query"},{"name":"key","description":"Source's API Key","required":true,"schema":{"type":"string","x-example":"[KEY]"},"in":"query"}]}},"\/migrations\/firebase":{"post":{"summary":"Migrate Firebase Data (Service Account)","operationId":"migrationsCreateFirebaseMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createFirebaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"serviceAccount":{"type":"string","description":"JSON of the Firebase service account credentials","x-example":"[SERVICE_ACCOUNT]"}},"required":["resources","serviceAccount"]}}}}}},"\/migrations\/firebase\/deauthorize":{"get":{"summary":"Revoke Appwrite's authorization to access Firebase Projects","operationId":"migrationsDeleteFirebaseAuth","tags":["migrations"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"deleteFirebaseAuth","cookies":false,"type":"","demo":"migrations\/delete-firebase-auth.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/oauth":{"post":{"summary":"Migrate Firebase Data (OAuth)","operationId":"migrationsCreateFirebaseOAuthMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createFirebaseOAuthMigration","cookies":false,"type":"","demo":"migrations\/create-firebase-o-auth-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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"projectId":{"type":"string","description":"Project ID of the Firebase Project","x-example":"[PROJECT_ID]"}},"required":["resources","projectId"]}}}}}},"\/migrations\/firebase\/projects":{"get":{"summary":"List Firebase Projects","operationId":"migrationsListFirebaseProjects","tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations Firebase Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/firebaseProjectList"}}}}},"x-appwrite":{"method":"listFirebaseProjects","cookies":false,"type":"","demo":"migrations\/list-firebase-projects.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/report":{"get":{"summary":"Generate a report on Firebase Data","operationId":"migrationsGetFirebaseReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getFirebaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"serviceAccount","description":"JSON of the Firebase service account credentials","required":true,"schema":{"type":"string","x-example":"[SERVICE_ACCOUNT]"},"in":"query"}]}},"\/migrations\/firebase\/report\/oauth":{"get":{"summary":"Generate a report on Firebase Data using OAuth","operationId":"migrationsGetFirebaseReportOAuth","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getFirebaseReportOAuth","cookies":false,"type":"","demo":"migrations\/get-firebase-report-o-auth.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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"projectId","description":"Project ID","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"query"}]}},"\/migrations\/nhost":{"post":{"summary":"Migrate NHost Data","operationId":"migrationsCreateNHostMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createNHostMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"subdomain":{"type":"string","description":"Source's Subdomain","x-example":"[SUBDOMAIN]"},"region":{"type":"string","description":"Source's Region","x-example":"[REGION]"},"adminSecret":{"type":"string","description":"Source's Admin Secret","x-example":"[ADMIN_SECRET]"},"database":{"type":"string","description":"Source's Database Name","x-example":"[DATABASE]"},"username":{"type":"string","description":"Source's Database Username","x-example":"[USERNAME]"},"password":{"type":"string","description":"Source's Database Password","x-example":"[PASSWORD]"},"port":{"type":"integer","description":"Source's Database Port","x-example":null}},"required":["resources","subdomain","region","adminSecret","database","username","password"]}}}}}},"\/migrations\/nhost\/report":{"get":{"summary":"Generate a report on NHost Data","operationId":"migrationsGetNHostReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getNHostReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate.","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"subdomain","description":"Source's Subdomain.","required":true,"schema":{"type":"string","x-example":"[SUBDOMAIN]"},"in":"query"},{"name":"region","description":"Source's Region.","required":true,"schema":{"type":"string","x-example":"[REGION]"},"in":"query"},{"name":"adminSecret","description":"Source's Admin Secret.","required":true,"schema":{"type":"string","x-example":"[ADMIN_SECRET]"},"in":"query"},{"name":"database","description":"Source's Database Name.","required":true,"schema":{"type":"string","x-example":"[DATABASE]"},"in":"query"},{"name":"username","description":"Source's Database Username.","required":true,"schema":{"type":"string","x-example":"[USERNAME]"},"in":"query"},{"name":"password","description":"Source's Database Password.","required":true,"schema":{"type":"string","x-example":"[PASSWORD]"},"in":"query"},{"name":"port","description":"Source's Database Port.","required":false,"schema":{"type":"integer","format":"int32","default":5432},"in":"query"}]}},"\/migrations\/supabase":{"post":{"summary":"Migrate Supabase Data","operationId":"migrationsCreateSupabaseMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createSupabaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"endpoint":{"type":"string","description":"Source's Supabase Endpoint","x-example":"https:\/\/example.com"},"apiKey":{"type":"string","description":"Source's API Key","x-example":"[API_KEY]"},"databaseHost":{"type":"string","description":"Source's Database Host","x-example":"[DATABASE_HOST]"},"username":{"type":"string","description":"Source's Database Username","x-example":"[USERNAME]"},"password":{"type":"string","description":"Source's Database Password","x-example":"[PASSWORD]"},"port":{"type":"integer","description":"Source's Database Port","x-example":null}},"required":["resources","endpoint","apiKey","databaseHost","username","password"]}}}}}},"\/migrations\/supabase\/report":{"get":{"summary":"Generate a report on Supabase Data","operationId":"migrationsGetSupabaseReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getSupabaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"endpoint","description":"Source's Supabase Endpoint.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"apiKey","description":"Source's API Key.","required":true,"schema":{"type":"string","x-example":"[API_KEY]"},"in":"query"},{"name":"databaseHost","description":"Source's Database Host.","required":true,"schema":{"type":"string","x-example":"[DATABASE_HOST]"},"in":"query"},{"name":"username","description":"Source's Database Username.","required":true,"schema":{"type":"string","x-example":"[USERNAME]"},"in":"query"},{"name":"password","description":"Source's Database Password.","required":true,"schema":{"type":"string","x-example":"[PASSWORD]"},"in":"query"},{"name":"port","description":"Source's Database Port.","required":false,"schema":{"type":"integer","format":"int32","default":5432},"in":"query"}]}},"\/migrations\/{migrationId}":{"get":{"summary":"Get Migration","operationId":"migrationsGet","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"migrationId","description":"Migration unique ID.","required":true,"schema":{"type":"string","x-example":"[MIGRATION_ID]"},"in":"path"}]},"patch":{"summary":"Retry Migration","operationId":"migrationsRetry","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"retry","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"migrationId","description":"Migration unique ID.","required":true,"schema":{"type":"string","x-example":"[MIGRATION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Migration","operationId":"migrationsDelete","tags":["migrations"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"migrations\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-migration.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"migrationId","description":"Migration ID.","required":true,"schema":{"type":"string","x-example":"[MIGRATION_ID]"},"in":"path"}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/project\/variables":{"get":{"summary":"List Variables","operationId":"projectListVariables","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","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]},"post":{"summary":"Create Variable","operationId":"projectCreateVariable","tags":["project"],"description":"Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"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"]}}}}}},"\/project\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"projectGetVariable","tags":["project"],"description":"Get a project variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"projectUpdateVariable","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","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"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":"projectDeleteVariable","tags":["project"],"description":"Delete a project variable by its unique ID. ","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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 Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"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.","x-example":null},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"region":{"type":"string","description":"Project Region.","x-example":"default","enum":["default"],"x-enum-name":null,"x-enum-keys":[]},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/max-sessions":{"patch":{"summary":"Update Project user sessions limit","operationId":"projectsUpdateAuthSessionsLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthSessionsLimit","cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10","x-example":1}},"required":["limit"]}}}}}},"\/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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to enable checking user's password against most commonly used passwords. Default is false.","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordHistory","cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of 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","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updatePersonalDataCheck","cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to check a password for similarity with personal data. Default is false.","x-example":false}},"required":["enabled"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password","enum":["email-password","magic-url","anonymous","invites","jwt","phone"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon","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","zoom","mock"],"x-enum-name":null,"x-enum-keys":[]},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web","enum":["web","flutter-web","flutter-ios","flutter-android","flutter-linux","flutter-macos","flutter-windows","apple-ios","apple-macos","apple-watchos","apple-tvos","android","unity"],"x-enum-name":"PlatformType","x-enum-keys":[]},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account","enum":["account","avatars","databases","locale","health","storage","teams","users","vcs","functions","proxy","graphql","migrations"],"x-enum-name":null,"x-enum-keys":[]},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/service\/all":{"patch":{"summary":"Update all service status","operationId":"projectsUpdateServiceStatusAll","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatusAll","cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/smtp":{"patch":{"summary":"Update SMTP configuration","operationId":"projectsUpdateSmtpConfiguration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateSmtpConfiguration","cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable custom SMTP service","x-example":false},"senderName":{"type":"string","description":"Name of the email sender","x-example":"[SENDER_NAME]"},"senderEmail":{"type":"string","description":"Email of the sender","x-example":"email@example.com"},"replyTo":{"type":"string","description":"Reply to email","x-example":"email@example.com"},"host":{"type":"string","description":"SMTP server host name","x-example":null},"port":{"type":"integer","description":"SMTP server port","x-example":null},"username":{"type":"string","description":"SMTP server username","x-example":"[USERNAME]"},"password":{"type":"string","description":"SMTP server password","x-example":"[PASSWORD]"},"secure":{"type":"string","description":"Does SMTP server use secure connection","x-example":"tls","enum":["tls"],"x-enum-name":null,"x-enum-keys":[]}},"required":["enabled"]}}}}}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateTeam","cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID of the team to transfer project to.","x-example":"[TEAM_ID]"}},"required":["teamId"]}}}}}},"\/projects\/{projectId}\/templates\/email\/{type}\/{locale}":{"get":{"summary":"Get custom email template","operationId":"projectsGetEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"getEmailTemplate","cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateEmailTemplate","cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","description":"Email Subject","x-example":"[SUBJECT]"},"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"},"senderName":{"type":"string","description":"Name of the email sender","x-example":"[SENDER_NAME]"},"senderEmail":{"type":"string","description":"Email of the sender","x-example":"email@example.com"},"replyTo":{"type":"string","description":"Reply to email","x-example":"email@example.com"}},"required":["subject","message"]}}}}},"delete":{"summary":"Reset custom email template","operationId":"projectsDeleteEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"deleteEmailTemplate","cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]}},"\/projects\/{projectId}\/templates\/sms\/{type}\/{locale}":{"get":{"summary":"Get custom SMS template","operationId":"projectsGetSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"getSmsTemplate","cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"updateSmsTemplate","cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"}},"required":["message"]}}}}},"delete":{"summary":"Reset custom SMS template","operationId":"projectsDeleteSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"deleteSmsTemplate","cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/proxy\/rules":{"get":{"summary":"List Rules","operationId":"proxyListRules","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","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRuleList"}}}}},"x-appwrite":{"method":"listRules","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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 Rule","operationId":"proxyCreateRule","tags":["proxy"],"description":"Create a new proxy rule.","responses":{"201":{"description":"Rule","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRule"}}}}},"x-appwrite":{"method":"createRule","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null},"resourceType":{"type":"string","description":"Action definition for the rule. Possible values are \"api\", \"function\"","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.","x-example":"[RESOURCE_ID]"}},"required":["domain","resourceType"]}}}}}},"\/proxy\/rules\/{ruleId}":{"get":{"summary":"Get Rule","operationId":"proxyGetRule","tags":["proxy"],"description":"Get a proxy rule by its unique ID.","responses":{"200":{"description":"Rule","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRule"}}}}},"x-appwrite":{"method":"getRule","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"ruleId","description":"Rule ID.","required":true,"schema":{"type":"string","x-example":"[RULE_ID]"},"in":"path"}]},"delete":{"summary":"Delete Rule","operationId":"proxyDeleteRule","tags":["proxy"],"description":"Delete a proxy rule by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteRule","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"ruleId","description":"Rule ID.","required":true,"schema":{"type":"string","x-example":"[RULE_ID]"},"in":"path"}]}},"\/proxy\/rules\/{ruleId}\/verification":{"patch":{"summary":"Update Rule Verification Status","operationId":"proxyUpdateRuleVerification","tags":["proxy"],"description":"","responses":{"200":{"description":"Rule","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRule"}}}}},"x-appwrite":{"method":"updateRuleVerification","cookies":false,"type":"","demo":"proxy\/update-rule-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"rules.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"ruleId","description":"Rule ID.","required":true,"schema":{"type":"string","x-example":"[RULE_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","cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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","cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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](\/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","cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permissions":{"type":"array","description":"An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](\/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](\/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","cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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","cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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","cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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","cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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","cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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","cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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","cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembership","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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","cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":null,"x-enum-keys":[]},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","description":"Array of user labels. Replaces the previous labels. Maximum of 5 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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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","cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":"+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","cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories":{"get":{"summary":"List Repositories","operationId":"vcsListRepositories","tags":["vcs"],"description":"","responses":{"200":{"description":"Provider Repositories List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/providerRepositoryList"}}}}},"x-appwrite":{"method":"listRepositories","cookies":false,"type":"","demo":"vcs\/list-repositories.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"}]},"post":{"summary":"Create repository","operationId":"vcsCreateRepository","tags":["vcs"],"description":"","responses":{"200":{"description":"ProviderRepository","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/providerRepository"}}}}},"x-appwrite":{"method":"createRepository","cookies":false,"type":"","demo":"vcs\/create-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Repository name (slug)","x-example":"[NAME]"},"private":{"type":"boolean","description":"Mark repository public or private","x-example":false}},"required":["name","private"]}}}}}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}":{"get":{"summary":"Get repository","operationId":"vcsGetRepository","tags":["vcs"],"description":"","responses":{"200":{"description":"ProviderRepository","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/providerRepository"}}}}},"x-appwrite":{"method":"getRepository","cookies":false,"type":"","demo":"vcs\/get-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"providerRepositoryId","description":"Repository Id","required":true,"schema":{"type":"string","x-example":"[PROVIDER_REPOSITORY_ID]"},"in":"path"}]}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches":{"get":{"summary":"List Repository Branches","operationId":"vcsListRepositoryBranches","tags":["vcs"],"description":"","responses":{"200":{"description":"Branches List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/branchList"}}}}},"x-appwrite":{"method":"listRepositoryBranches","cookies":false,"type":"","demo":"vcs\/list-repository-branches.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"providerRepositoryId","description":"Repository Id","required":true,"schema":{"type":"string","x-example":"[PROVIDER_REPOSITORY_ID]"},"in":"path"}]}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/detection":{"post":{"summary":"Detect runtime settings from source code","operationId":"vcsCreateRepositoryDetection","tags":["vcs"],"description":"","responses":{"200":{"description":"Detection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/detection"}}}}},"x-appwrite":{"method":"createRepositoryDetection","cookies":false,"type":"","demo":"vcs\/create-repository-detection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"providerRepositoryId","description":"Repository Id","required":true,"schema":{"type":"string","x-example":"[PROVIDER_REPOSITORY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"providerRootDirectory":{"type":"string","description":"Path to Root Directory","x-example":"[PROVIDER_ROOT_DIRECTORY]"}}}}}}}},"\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}":{"patch":{"summary":"Authorize external deployment","operationId":"vcsUpdateExternalDeployments","tags":["vcs"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"updateExternalDeployments","cookies":false,"type":"","demo":"vcs\/update-external-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"repositoryId","description":"VCS Repository Id","required":true,"schema":{"type":"string","x-example":"[REPOSITORY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"providerPullRequestId":{"type":"string","description":"GitHub Pull Request Id","x-example":"[PROVIDER_PULL_REQUEST_ID]"}},"required":["providerPullRequestId"]}}}}}},"\/vcs\/installations":{"get":{"summary":"List installations","operationId":"vcsListInstallations","tags":["vcs"],"description":"","responses":{"200":{"description":"Installations List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/installationList"}}}}},"x-appwrite":{"method":"listInstallations","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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"}]}},"\/vcs\/installations\/{installationId}":{"get":{"summary":"Get installation","operationId":"vcsGetInstallation","tags":["vcs"],"description":"","responses":{"200":{"description":"Installation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/installation"}}}}},"x-appwrite":{"method":"getInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Installation","operationId":"vcsDeleteInstallation","tags":["vcs"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"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":[]}],"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"]},"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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"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"]},"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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/localeCode"},"x-example":""}},"required":["total","localeCodes"]},"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":{"$ref":"#\/components\/schemas\/migration"},"x-example":""}},"required":["total","migrations"]},"firebaseProjectList":{"description":"Migrations Firebase Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/firebaseProject"},"x-example":""}},"required":["total","projects"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"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"]},"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"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":[{}]},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForVcs":{"type":"boolean","description":"VCS service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForProxy":{"type":"boolean","description":"Proxy service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL service status","x-example":true},"serviceStatusForMigrations":{"type":"boolean","description":"Migrations 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","providers","platforms","webhooks","keys","smtpEnabled","smtpSenderName","smtpSenderEmail","smtpReplyTo","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForVcs","serviceStatusForFunctions","serviceStatusForProxy","serviceStatusForGraphql","serviceStatusForMigrations"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","storage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsFailure":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsSuccess":{"type":"array","description":"Aggregated stats for function execution successes.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsFailure":{"type":"array","description":"Aggregated stats for function build failures.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsSuccess":{"type":"array","description":"Aggregated stats for function build successes.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build duration.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","executionsTotal","executionsFailure","executionsSuccess","executionsTime","buildsTotal","buildsFailure","buildsSuccess","buildsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databases":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buckets":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requests","network","executions","documents","databases","users","storage","buckets"]},"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"]},"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"]},"migration":{"description":"Migration","type":"object","properties":{"$id":{"type":"string","description":"Migration 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"},"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"},"resources":{"type":"array","description":"Resources to migration.","items":{"type":"string"},"x-example":["user"]},"statusCounters":{"type":"object","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","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":"string","description":"All errors that occurred during the migration process.","x-example":[]}},"required":["$id","$createdAt","$updatedAt","status","stage","source","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"]},"firebaseProject":{"description":"MigrationFirebaseProject","type":"object","properties":{"projectId":{"type":"string","description":"Project ID.","x-example":"my-project"},"displayName":{"type":"string","description":"Project display name.","x-example":"My Project"}},"required":["projectId","displayName"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-1.4.x-server.json b/app/config/specs/open-api3-1.4.x-server.json index f4d0b3f98e..87d38a2ed2 100644 --- a/app/config/specs/open-api3-1.4.x-server.json +++ b/app/config/specs/open-api3-1.4.x-server.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","weight":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","weight":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","weight":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","weight":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","weight":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"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"}},"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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","weight":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","weight":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}}}}}}}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"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?","x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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, statusCode, duration","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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"},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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"},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"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":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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":[]}],"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"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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,"schema":{"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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"schema":{"type":"string","x-example":"[IDENTITY_ID]"},"in":"path"}]}},"\/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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"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":52,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":51,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"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":53,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":55,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":58,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":57,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":59,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":62,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":73,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":70,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":71,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":83,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","weight":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","weight":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":69,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":68,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","weight":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":72,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":63,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","weight":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","weight":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":74,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":85,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":84,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}}}}},"\/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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":87,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":86,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":88,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":89,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":238,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":237,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","x-example":"[TEMPLATE_BRANCH]"}},"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":239,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":243,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"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]"}},"required":["name","runtime"]}}}}},"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":246,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":248,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":247,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","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":249,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":245,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":250,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":251,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","tags":["functions"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"downloadDeployment","weight":244,"cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","x-example":"{}"}}}}}}}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":256,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":255,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":257,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":258,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":259,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":119,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":112,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":111,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":117,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":118,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":113,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":168,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":169,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":171,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":204,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":196,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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":223,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":201,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":202,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":203,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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":205,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":222,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","weight":212,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":209,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":215,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":206,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":219,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":221,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":220,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":218,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":[]}],"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"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 5ac56609fd..f3e8254dde 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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 platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/console\/assistant":{"post":{"summary":"Ask Query","operationId":"assistantChat","tags":["assistant"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"chat","weight":275,"cookies":false,"type":"","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":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Query","x-example":"[QUERY]"}},"required":["query"]}}}}}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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, statusCode, duration","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}}},"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":"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":[]}],"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"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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,"schema":{"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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"schema":{"type":"string","x-example":"[IDENTITY_ID]"},"in":"path"}]}},"\/account\/jwt":{"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":20,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":19,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":15,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":16,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":17,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":18,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","x-example":"{}"}}}}}}}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}}},"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":[]}],"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"]},"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"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 8bb7e8de50..fd8212e58e 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `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. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","x-example":"[CODE]"}},"required":["userId","email","password"]}}}}}},"\/account\/jwt":{"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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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 platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/console\/assistant":{"post":{"summary":"Ask Query","operationId":"assistantChat","tags":["assistant"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"chat","weight":275,"cookies":false,"type":"","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":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Query","x-example":"[QUERY]"}},"required":["query"]}}}}}},"\/console\/variables":{"get":{"summary":"Get Variables","operationId":"consoleVariables","tags":["console"],"description":"Get all Environment Variables that are relevant for the console.","responses":{"200":{"description":"Console Variables","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/consoleVariables"}}}}},"x-appwrite":{"method":"variables","weight":274,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","x-example":false}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":94,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","weight":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","weight":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","weight":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","weight":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","weight":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","weight":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","weight":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}}}}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":91,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":58,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":96,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database 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":52,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":95,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","php-8.0","php-8.1","ruby-3.0","ruby-3.1","python-3.8","python-3.9","python-3.10","dart-2.15","dart-2.16","dart-2.17","dotnet-3.1","dotnet-6.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","kotlin-1.6","cpp-17.0"],"x-enum-name":null,"x-enum-keys":[]},"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?","x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":226,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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, statusCode, duration","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","weight":225,"cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":120,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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 Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":119,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"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.","x-example":null},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"region":{"type":"string","description":"Project Region.","x-example":"default","enum":["default"],"x-enum-name":null,"x-enum-keys":[]},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":121,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":122,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":134,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/max-sessions":{"patch":{"summary":"Update Project user sessions limit","operationId":"projectsUpdateAuthSessionsLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthSessionsLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10","x-example":1}},"required":["limit"]}}}}}},"\/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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","weight":131,"cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to enable checking user's password against most commonly used passwords. Default is false.","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordHistory","weight":130,"cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of 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","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updatePersonalDataCheck","weight":132,"cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to check a password for similarity with personal data. Default is false.","x-example":false}},"required":["enabled"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":129,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password","enum":["email-password","magic-url","anonymous","invites","jwt","phone"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":152,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":151,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":153,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":155,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":154,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":142,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":141,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":143,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":144,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":145,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon","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","zoom","mock"],"x-enum-name":null,"x-enum-keys":[]},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":147,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":146,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web","enum":["web","flutter-web","flutter-ios","flutter-android","flutter-linux","flutter-macos","flutter-windows","apple-ios","apple-macos","apple-watchos","apple-tvos","android","unity"],"x-enum-name":"PlatformType","x-enum-keys":[]},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":148,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":149,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":124,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account","enum":["account","avatars","databases","locale","health","storage","teams","users","functions","graphql"],"x-enum-name":null,"x-enum-keys":[]},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/service\/all":{"patch":{"summary":"Update all service status","operationId":"projectsUpdateServiceStatusAll","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatusAll","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/smtp":{"patch":{"summary":"Update SMTP configuration","operationId":"projectsUpdateSmtpConfiguration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateSmtpConfiguration","weight":156,"cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable custom SMTP service","x-example":false},"sender":{"type":"string","description":"SMTP sender email","x-example":"email@example.com"},"host":{"type":"string","description":"SMTP server host name","x-example":null},"port":{"type":"integer","description":"SMTP server port","x-example":null},"username":{"type":"string","description":"SMTP server username","x-example":"[USERNAME]"},"password":{"type":"string","description":"SMTP server password","x-example":"[PASSWORD]"},"secure":{"type":"string","description":"Does SMTP server use secure connection","x-example":"tls","enum":["tls"],"x-enum-name":null,"x-enum-keys":[]}},"required":["enabled","sender","host","port","username","password"]}}}}}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateTeam","weight":123,"cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID of the team to transfer project to.","x-example":"[TEAM_ID]"}},"required":["teamId"]}}}}}},"\/projects\/{projectId}\/templates\/email\/{type}\/{locale}":{"get":{"summary":"Get custom email template","operationId":"projectsGetEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"getEmailTemplate","weight":158,"cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateEmailTemplate","weight":160,"cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"senderName":{"type":"string","description":"Name of the email sender","x-example":"[SENDER_NAME]"},"senderEmail":{"type":"string","description":"Email of the sender","x-example":"email@example.com"},"subject":{"type":"string","description":"Email Subject","x-example":"[SUBJECT]"},"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"},"replyTo":{"type":"string","description":"Reply to email","x-example":"email@example.com"}},"required":["senderName","senderEmail","subject","message"]}}}}},"delete":{"summary":"Reset custom email template","operationId":"projectsDeleteEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"deleteEmailTemplate","weight":162,"cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]}},"\/projects\/{projectId}\/templates\/sms\/{type}\/{locale}":{"get":{"summary":"Get custom SMS template","operationId":"projectsGetSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"getSmsTemplate","weight":157,"cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"updateSmsTemplate","weight":159,"cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"}},"required":["message"]}}}}},"delete":{"summary":"Reset custom SMS template","operationId":"projectsDeleteSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"deleteSmsTemplate","weight":161,"cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":136,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":135,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":137,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":140,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permissions":{"type":"array","description":"An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":177,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":192,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":null,"x-enum-keys":[]},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":220,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","description":"Array of user labels. Replaces the previous labels. Maximum of 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":"+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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":"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":[]}],"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"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"]},"account":{"description":"Account","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"},"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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","accessedAt"]},"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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":[{}]},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"smtpEnabled":{"type":"boolean","description":"Status for custom SMTP","x-example":false},"smtpSender":{"type":"string","description":"SMTP sender email","x-example":"john@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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL 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","providers","platforms","webhooks","keys","domains","smtpEnabled","smtpSender","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions","serviceStatusForGraphql"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain 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"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","filesStorage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]},"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"}},"required":["_APP_DOMAIN_TARGET","_APP_STORAGE_LIMIT","_APP_FUNCTIONS_SIZE_LIMIT","_APP_USAGE_STATS"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New 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","email","password"]}}}}}},"\/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","cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/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","cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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,"schema":{"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"schema":{"type":"string","x-example":"[IDENTITY_ID]"},"in":"path"}]}},"\/account\/jwt":{"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","cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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","cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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","cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"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","cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create OAuth2 Session","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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","cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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","cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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","cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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","cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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","cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/console\/assistant":{"post":{"summary":"Ask Query","operationId":"assistantChat","tags":["assistant"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"chat","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Prompt. A string containing questions asked to the AI assistant.","x-example":"[PROMPT]"}},"required":["prompt"]}}}}}},"\/console\/variables":{"get":{"summary":"Get Variables","operationId":"consoleVariables","tags":["console"],"description":"Get all Environment Variables that are relevant for the console.","responses":{"200":{"description":"Console Variables","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/consoleVariables"}}}}},"x-appwrite":{"method":"variables","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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","cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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]","x-global":true},"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\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/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","cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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","cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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","cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}}}}},"\/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","cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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](\/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","cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","x-example":"[TEMPLATE_BRANCH]"}},"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","cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/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","cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"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]"}},"required":["name","runtime"]}}}}},"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","cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","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](\/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","cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"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","cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","tags":["functions"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"downloadDeployment","cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/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","cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","x-example":"{}"}}}}}}}},"\/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","cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"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","cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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","cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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","cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/migrations":{"get":{"summary":"List Migrations","operationId":"migrationsList","tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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, resources, statusCounters, resourceData, errors","required":false,"schema":{"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"}]}},"\/migrations\/appwrite":{"post":{"summary":"Migrate Appwrite Data","operationId":"migrationsCreateAppwriteMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createAppwriteMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"endpoint":{"type":"string","description":"Source's Appwrite Endpoint","x-example":"https:\/\/example.com"},"projectId":{"type":"string","description":"Source's Project ID","x-example":"[PROJECT_ID]"},"apiKey":{"type":"string","description":"Source's API Key","x-example":"[API_KEY]"}},"required":["resources","endpoint","projectId","apiKey"]}}}}}},"\/migrations\/appwrite\/report":{"get":{"summary":"Generate a report on Appwrite Data","operationId":"migrationsGetAppwriteReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getAppwriteReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"endpoint","description":"Source's Appwrite Endpoint","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"projectID","description":"Source's Project ID","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"query"},{"name":"key","description":"Source's API Key","required":true,"schema":{"type":"string","x-example":"[KEY]"},"in":"query"}]}},"\/migrations\/firebase":{"post":{"summary":"Migrate Firebase Data (Service Account)","operationId":"migrationsCreateFirebaseMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createFirebaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"serviceAccount":{"type":"string","description":"JSON of the Firebase service account credentials","x-example":"[SERVICE_ACCOUNT]"}},"required":["resources","serviceAccount"]}}}}}},"\/migrations\/firebase\/deauthorize":{"get":{"summary":"Revoke Appwrite's authorization to access Firebase Projects","operationId":"migrationsDeleteFirebaseAuth","tags":["migrations"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"deleteFirebaseAuth","cookies":false,"type":"","demo":"migrations\/delete-firebase-auth.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/oauth":{"post":{"summary":"Migrate Firebase Data (OAuth)","operationId":"migrationsCreateFirebaseOAuthMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createFirebaseOAuthMigration","cookies":false,"type":"","demo":"migrations\/create-firebase-o-auth-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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"projectId":{"type":"string","description":"Project ID of the Firebase Project","x-example":"[PROJECT_ID]"}},"required":["resources","projectId"]}}}}}},"\/migrations\/firebase\/projects":{"get":{"summary":"List Firebase Projects","operationId":"migrationsListFirebaseProjects","tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations Firebase Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/firebaseProjectList"}}}}},"x-appwrite":{"method":"listFirebaseProjects","cookies":false,"type":"","demo":"migrations\/list-firebase-projects.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/report":{"get":{"summary":"Generate a report on Firebase Data","operationId":"migrationsGetFirebaseReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getFirebaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"serviceAccount","description":"JSON of the Firebase service account credentials","required":true,"schema":{"type":"string","x-example":"[SERVICE_ACCOUNT]"},"in":"query"}]}},"\/migrations\/firebase\/report\/oauth":{"get":{"summary":"Generate a report on Firebase Data using OAuth","operationId":"migrationsGetFirebaseReportOAuth","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getFirebaseReportOAuth","cookies":false,"type":"","demo":"migrations\/get-firebase-report-o-auth.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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"projectId","description":"Project ID","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"query"}]}},"\/migrations\/nhost":{"post":{"summary":"Migrate NHost Data","operationId":"migrationsCreateNHostMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createNHostMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"subdomain":{"type":"string","description":"Source's Subdomain","x-example":"[SUBDOMAIN]"},"region":{"type":"string","description":"Source's Region","x-example":"[REGION]"},"adminSecret":{"type":"string","description":"Source's Admin Secret","x-example":"[ADMIN_SECRET]"},"database":{"type":"string","description":"Source's Database Name","x-example":"[DATABASE]"},"username":{"type":"string","description":"Source's Database Username","x-example":"[USERNAME]"},"password":{"type":"string","description":"Source's Database Password","x-example":"[PASSWORD]"},"port":{"type":"integer","description":"Source's Database Port","x-example":null}},"required":["resources","subdomain","region","adminSecret","database","username","password"]}}}}}},"\/migrations\/nhost\/report":{"get":{"summary":"Generate a report on NHost Data","operationId":"migrationsGetNHostReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getNHostReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate.","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"subdomain","description":"Source's Subdomain.","required":true,"schema":{"type":"string","x-example":"[SUBDOMAIN]"},"in":"query"},{"name":"region","description":"Source's Region.","required":true,"schema":{"type":"string","x-example":"[REGION]"},"in":"query"},{"name":"adminSecret","description":"Source's Admin Secret.","required":true,"schema":{"type":"string","x-example":"[ADMIN_SECRET]"},"in":"query"},{"name":"database","description":"Source's Database Name.","required":true,"schema":{"type":"string","x-example":"[DATABASE]"},"in":"query"},{"name":"username","description":"Source's Database Username.","required":true,"schema":{"type":"string","x-example":"[USERNAME]"},"in":"query"},{"name":"password","description":"Source's Database Password.","required":true,"schema":{"type":"string","x-example":"[PASSWORD]"},"in":"query"},{"name":"port","description":"Source's Database Port.","required":false,"schema":{"type":"integer","format":"int32","default":5432},"in":"query"}]}},"\/migrations\/supabase":{"post":{"summary":"Migrate Supabase Data","operationId":"migrationsCreateSupabaseMigration","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"createSupabaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","description":"List of resources to migrate","x-example":null,"items":{"type":"string"}},"endpoint":{"type":"string","description":"Source's Supabase Endpoint","x-example":"https:\/\/example.com"},"apiKey":{"type":"string","description":"Source's API Key","x-example":"[API_KEY]"},"databaseHost":{"type":"string","description":"Source's Database Host","x-example":"[DATABASE_HOST]"},"username":{"type":"string","description":"Source's Database Username","x-example":"[USERNAME]"},"password":{"type":"string","description":"Source's Database Password","x-example":"[PASSWORD]"},"port":{"type":"integer","description":"Source's Database Port","x-example":null}},"required":["resources","endpoint","apiKey","databaseHost","username","password"]}}}}}},"\/migrations\/supabase\/report":{"get":{"summary":"Generate a report on Supabase Data","operationId":"migrationsGetSupabaseReport","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migrationReport"}}}}},"x-appwrite":{"method":"getSupabaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"resources","description":"List of resources to migrate","required":true,"schema":{"type":"array","items":{"type":"string"}},"in":"query"},{"name":"endpoint","description":"Source's Supabase Endpoint.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"apiKey","description":"Source's API Key.","required":true,"schema":{"type":"string","x-example":"[API_KEY]"},"in":"query"},{"name":"databaseHost","description":"Source's Database Host.","required":true,"schema":{"type":"string","x-example":"[DATABASE_HOST]"},"in":"query"},{"name":"username","description":"Source's Database Username.","required":true,"schema":{"type":"string","x-example":"[USERNAME]"},"in":"query"},{"name":"password","description":"Source's Database Password.","required":true,"schema":{"type":"string","x-example":"[PASSWORD]"},"in":"query"},{"name":"port","description":"Source's Database Port.","required":false,"schema":{"type":"integer","format":"int32","default":5432},"in":"query"}]}},"\/migrations\/{migrationId}":{"get":{"summary":"Get Migration","operationId":"migrationsGet","tags":["migrations"],"description":"","responses":{"200":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"migrationId","description":"Migration unique ID.","required":true,"schema":{"type":"string","x-example":"[MIGRATION_ID]"},"in":"path"}]},"patch":{"summary":"Retry Migration","operationId":"migrationsRetry","tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/migration"}}}}},"x-appwrite":{"method":"retry","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"migrationId","description":"Migration unique ID.","required":true,"schema":{"type":"string","x-example":"[MIGRATION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Migration","operationId":"migrationsDelete","tags":["migrations"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"migrations\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-migration.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"migrationId","description":"Migration ID.","required":true,"schema":{"type":"string","x-example":"[MIGRATION_ID]"},"in":"path"}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/project\/variables":{"get":{"summary":"List Variables","operationId":"projectListVariables","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","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]},"post":{"summary":"Create Variable","operationId":"projectCreateVariable","tags":["project"],"description":"Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"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"]}}}}}},"\/project\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"projectGetVariable","tags":["project"],"description":"Get a project variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"projectUpdateVariable","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","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"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":"projectDeleteVariable","tags":["project"],"description":"Delete a project variable by its unique ID. ","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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 Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"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.","x-example":null},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"region":{"type":"string","description":"Project Region.","x-example":"default","enum":["default"],"x-enum-name":null,"x-enum-keys":[]},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/max-sessions":{"patch":{"summary":"Update Project user sessions limit","operationId":"projectsUpdateAuthSessionsLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthSessionsLimit","cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10","x-example":1}},"required":["limit"]}}}}}},"\/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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to enable checking user's password against most commonly used passwords. Default is false.","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthPasswordHistory","cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of 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","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","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updatePersonalDataCheck","cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set whether or not to check a password for similarity with personal data. Default is false.","x-example":false}},"required":["enabled"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password","enum":["email-password","magic-url","anonymous","invites","jwt","phone"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon","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","zoom","mock"],"x-enum-name":null,"x-enum-keys":[]},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web","enum":["web","flutter-web","flutter-ios","flutter-android","flutter-linux","flutter-macos","flutter-windows","apple-ios","apple-macos","apple-watchos","apple-tvos","android","unity"],"x-enum-name":"PlatformType","x-enum-keys":[]},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account","enum":["account","avatars","databases","locale","health","storage","teams","users","vcs","functions","proxy","graphql","migrations"],"x-enum-name":null,"x-enum-keys":[]},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/service\/all":{"patch":{"summary":"Update all service status","operationId":"projectsUpdateServiceStatusAll","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatusAll","cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/smtp":{"patch":{"summary":"Update SMTP configuration","operationId":"projectsUpdateSmtpConfiguration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateSmtpConfiguration","cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable custom SMTP service","x-example":false},"senderName":{"type":"string","description":"Name of the email sender","x-example":"[SENDER_NAME]"},"senderEmail":{"type":"string","description":"Email of the sender","x-example":"email@example.com"},"replyTo":{"type":"string","description":"Reply to email","x-example":"email@example.com"},"host":{"type":"string","description":"SMTP server host name","x-example":null},"port":{"type":"integer","description":"SMTP server port","x-example":null},"username":{"type":"string","description":"SMTP server username","x-example":"[USERNAME]"},"password":{"type":"string","description":"SMTP server password","x-example":"[PASSWORD]"},"secure":{"type":"string","description":"Does SMTP server use secure connection","x-example":"tls","enum":["tls"],"x-enum-name":null,"x-enum-keys":[]}},"required":["enabled"]}}}}}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateTeam","cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID of the team to transfer project to.","x-example":"[TEAM_ID]"}},"required":["teamId"]}}}}}},"\/projects\/{projectId}\/templates\/email\/{type}\/{locale}":{"get":{"summary":"Get custom email template","operationId":"projectsGetEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"getEmailTemplate","cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateEmailTemplate","cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","description":"Email Subject","x-example":"[SUBJECT]"},"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"},"senderName":{"type":"string","description":"Name of the email sender","x-example":"[SENDER_NAME]"},"senderEmail":{"type":"string","description":"Email of the sender","x-example":"email@example.com"},"replyTo":{"type":"string","description":"Reply to email","x-example":"email@example.com"}},"required":["subject","message"]}}}}},"delete":{"summary":"Reset custom email template","operationId":"projectsDeleteEmailTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/emailTemplate"}}}}},"x-appwrite":{"method":"deleteEmailTemplate","cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","magicsession","recovery","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]}},"\/projects\/{projectId}\/templates\/sms\/{type}\/{locale}":{"get":{"summary":"Get custom SMS template","operationId":"projectsGetSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"getSmsTemplate","cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"updateSmsTemplate","cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Template message","x-example":"[MESSAGE]"}},"required":["message"]}}}}},"delete":{"summary":"Reset custom SMS template","operationId":"projectsDeleteSmsTemplate","tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/smsTemplate"}}}}},"x-appwrite":{"method":"deleteSmsTemplate","cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"type","description":"Template type","required":true,"schema":{"type":"string","x-example":"verification","enum":["verification","login","invitation"],"x-enum-name":null,"x-enum-keys":[]},"in":"path"},{"name":"locale","description":"Template locale","required":true,"schema":{"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":null,"x-enum-keys":[]},"in":"path"}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/proxy\/rules":{"get":{"summary":"List Rules","operationId":"proxyListRules","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","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRuleList"}}}}},"x-appwrite":{"method":"listRules","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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 Rule","operationId":"proxyCreateRule","tags":["proxy"],"description":"Create a new proxy rule.","responses":{"201":{"description":"Rule","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRule"}}}}},"x-appwrite":{"method":"createRule","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null},"resourceType":{"type":"string","description":"Action definition for the rule. Possible values are \"api\", \"function\"","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.","x-example":"[RESOURCE_ID]"}},"required":["domain","resourceType"]}}}}}},"\/proxy\/rules\/{ruleId}":{"get":{"summary":"Get Rule","operationId":"proxyGetRule","tags":["proxy"],"description":"Get a proxy rule by its unique ID.","responses":{"200":{"description":"Rule","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRule"}}}}},"x-appwrite":{"method":"getRule","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"ruleId","description":"Rule ID.","required":true,"schema":{"type":"string","x-example":"[RULE_ID]"},"in":"path"}]},"delete":{"summary":"Delete Rule","operationId":"proxyDeleteRule","tags":["proxy"],"description":"Delete a proxy rule by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteRule","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"ruleId","description":"Rule ID.","required":true,"schema":{"type":"string","x-example":"[RULE_ID]"},"in":"path"}]}},"\/proxy\/rules\/{ruleId}\/verification":{"patch":{"summary":"Update Rule Verification Status","operationId":"proxyUpdateRuleVerification","tags":["proxy"],"description":"","responses":{"200":{"description":"Rule","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/proxyRule"}}}}},"x-appwrite":{"method":"updateRuleVerification","cookies":false,"type":"","demo":"proxy\/update-rule-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"rules.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"ruleId","description":"Rule ID.","required":true,"schema":{"type":"string","x-example":"[RULE_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","cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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","cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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](\/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","cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permissions":{"type":"array","description":"An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](\/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](\/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","cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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","cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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","cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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","cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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","cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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","cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"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). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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","cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembership","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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","cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"schema":{"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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":null,"x-enum-keys":[]},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","description":"Array of user labels. Replaces the previous labels. Maximum of 5 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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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","cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":"+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","cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories":{"get":{"summary":"List Repositories","operationId":"vcsListRepositories","tags":["vcs"],"description":"","responses":{"200":{"description":"Provider Repositories List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/providerRepositoryList"}}}}},"x-appwrite":{"method":"listRepositories","cookies":false,"type":"","demo":"vcs\/list-repositories.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"}]},"post":{"summary":"Create repository","operationId":"vcsCreateRepository","tags":["vcs"],"description":"","responses":{"200":{"description":"ProviderRepository","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/providerRepository"}}}}},"x-appwrite":{"method":"createRepository","cookies":false,"type":"","demo":"vcs\/create-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Repository name (slug)","x-example":"[NAME]"},"private":{"type":"boolean","description":"Mark repository public or private","x-example":false}},"required":["name","private"]}}}}}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}":{"get":{"summary":"Get repository","operationId":"vcsGetRepository","tags":["vcs"],"description":"","responses":{"200":{"description":"ProviderRepository","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/providerRepository"}}}}},"x-appwrite":{"method":"getRepository","cookies":false,"type":"","demo":"vcs\/get-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"providerRepositoryId","description":"Repository Id","required":true,"schema":{"type":"string","x-example":"[PROVIDER_REPOSITORY_ID]"},"in":"path"}]}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches":{"get":{"summary":"List Repository Branches","operationId":"vcsListRepositoryBranches","tags":["vcs"],"description":"","responses":{"200":{"description":"Branches List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/branchList"}}}}},"x-appwrite":{"method":"listRepositoryBranches","cookies":false,"type":"","demo":"vcs\/list-repository-branches.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"providerRepositoryId","description":"Repository Id","required":true,"schema":{"type":"string","x-example":"[PROVIDER_REPOSITORY_ID]"},"in":"path"}]}},"\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/detection":{"post":{"summary":"Detect runtime settings from source code","operationId":"vcsCreateRepositoryDetection","tags":["vcs"],"description":"","responses":{"200":{"description":"Detection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/detection"}}}}},"x-appwrite":{"method":"createRepositoryDetection","cookies":false,"type":"","demo":"vcs\/create-repository-detection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"providerRepositoryId","description":"Repository Id","required":true,"schema":{"type":"string","x-example":"[PROVIDER_REPOSITORY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"providerRootDirectory":{"type":"string","description":"Path to Root Directory","x-example":"[PROVIDER_ROOT_DIRECTORY]"}}}}}}}},"\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}":{"patch":{"summary":"Authorize external deployment","operationId":"vcsUpdateExternalDeployments","tags":["vcs"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"updateExternalDeployments","cookies":false,"type":"","demo":"vcs\/update-external-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"},{"name":"repositoryId","description":"VCS Repository Id","required":true,"schema":{"type":"string","x-example":"[REPOSITORY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"providerPullRequestId":{"type":"string","description":"GitHub Pull Request Id","x-example":"[PROVIDER_PULL_REQUEST_ID]"}},"required":["providerPullRequestId"]}}}}}},"\/vcs\/installations":{"get":{"summary":"List installations","operationId":"vcsListInstallations","tags":["vcs"],"description":"","responses":{"200":{"description":"Installations List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/installationList"}}}}},"x-appwrite":{"method":"listInstallations","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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,"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"}]}},"\/vcs\/installations\/{installationId}":{"get":{"summary":"Get installation","operationId":"vcsGetInstallation","tags":["vcs"],"description":"","responses":{"200":{"description":"Installation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/installation"}}}}},"x-appwrite":{"method":"getInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"type":"string","x-example":"[INSTALLATION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Installation","operationId":"vcsDeleteInstallation","tags":["vcs"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"installationId","description":"Installation Id","required":true,"schema":{"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":[]}],"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"]},"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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"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"]},"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":{"$ref":"#\/components\/schemas\/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":{"$ref":"#\/components\/schemas\/localeCode"},"x-example":""}},"required":["total","localeCodes"]},"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":{"$ref":"#\/components\/schemas\/migration"},"x-example":""}},"required":["total","migrations"]},"firebaseProjectList":{"description":"Migrations Firebase Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/firebaseProject"},"x-example":""}},"required":["total","projects"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"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"]},"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"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":[{}]},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForVcs":{"type":"boolean","description":"VCS service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForProxy":{"type":"boolean","description":"Proxy service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL service status","x-example":true},"serviceStatusForMigrations":{"type":"boolean","description":"Migrations 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","providers","platforms","webhooks","keys","smtpEnabled","smtpSenderName","smtpSenderEmail","smtpReplyTo","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForVcs","serviceStatusForFunctions","serviceStatusForProxy","serviceStatusForGraphql","serviceStatusForMigrations"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","storage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsFailure":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsSuccess":{"type":"array","description":"Aggregated stats for function execution successes.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsFailure":{"type":"array","description":"Aggregated stats for function build failures.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsSuccess":{"type":"array","description":"Aggregated stats for function build successes.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build duration.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","executionsTotal","executionsFailure","executionsSuccess","executionsTime","buildsTotal","buildsFailure","buildsSuccess","buildsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databases":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buckets":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requests","network","executions","documents","databases","users","storage","buckets"]},"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"]},"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"]},"migration":{"description":"Migration","type":"object","properties":{"$id":{"type":"string","description":"Migration 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"},"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"},"resources":{"type":"array","description":"Resources to migration.","items":{"type":"string"},"x-example":["user"]},"statusCounters":{"type":"object","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","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":"string","description":"All errors that occurred during the migration process.","x-example":[]}},"required":["$id","$createdAt","$updatedAt","status","stage","source","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"]},"firebaseProject":{"description":"MigrationFirebaseProject","type":"object","properties":{"projectId":{"type":"string","description":"Project ID.","x-example":"my-project"},"displayName":{"type":"string","description":"Project display name.","x-example":"My Project"}},"required":["projectId","displayName"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 70e72f510b..87d38a2ed2 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","weight":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","weight":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","weight":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","weight":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","weight":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","weight":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","weight":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}}}}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","php-8.0","php-8.1","ruby-3.0","ruby-3.1","python-3.8","python-3.9","python-3.10","dart-2.15","dart-2.16","dart-2.17","dotnet-3.1","dotnet-6.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","kotlin-1.6","cpp-17.0"],"x-enum-name":null,"x-enum-keys":[]},"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?","x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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, statusCode, duration","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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":[]}],"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"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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,"schema":{"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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"schema":{"type":"string","x-example":"[IDENTITY_ID]"},"in":"path"}]}},"\/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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update 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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"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":52,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":51,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"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":53,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":55,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":58,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":57,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":59,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":62,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":73,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":70,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"AttributeBoolean","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":71,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":"","responses":{"200":{"description":"AttributeDatetime","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":83,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"updateEmailAttribute","weight":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"updateEnumAttribute","weight":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":69,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"updateFloatAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":68,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"updateIntegerAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"updateIpAttribute","weight":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":72,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":63,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"updateStringAttribute","weight":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"updateUrlAttribute","weight":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":74,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":85,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","content":{"":{"schema":{"$ref":"#\/components\/schemas\/attributeRelationship"}}}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":84,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}}}}},"\/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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":87,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":86,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":88,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":89,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":238,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":237,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","x-example":"[TEMPLATE_BRANCH]"}},"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":239,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":243,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"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]"}},"required":["name","runtime"]}}}}},"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":246,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":248,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":247,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","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":249,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":245,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":250,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":251,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","tags":["functions"],"description":"","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"downloadDeployment","weight":244,"cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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","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":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","x-example":"{}"}}}}}}}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/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":256,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":255,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":257,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":258,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":259,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"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":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":119,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/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":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":112,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":111,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":117,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":118,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":113,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":168,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":169,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":171,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update 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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"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":204,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":196,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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":223,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":201,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":202,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":203,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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":205,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":222,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateLabels","weight":212,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":209,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":215,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":206,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":219,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":221,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":220,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":218,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":[]}],"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"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-1.4.x-client.json b/app/config/specs/swagger2-1.4.x-client.json index 2e9b841b0b..1b291408f0 100644 --- a/app/config/specs/swagger2-1.4.x-client.json +++ b/app/config/specs/swagger2-1.4.x-client.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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, statusCode, duration","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","default":false,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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"]}}]}},"\/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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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"]}}]}}},"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":"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":[]}],"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"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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":"string","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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"type":"string","x-example":"[IDENTITY_ID]","in":"path"}]}},"\/account\/jwt":{"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":20,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":19,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":15,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":16,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":17,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":18,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","default":[],"x-example":"{}"}}}}]}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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"]}}]}},"\/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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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"]}}]}}},"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":[]}],"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"]},"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"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"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.4.x-console.json b/app/config/specs/swagger2-1.4.x-console.json index 61c0ca11f2..cf2b52db4b 100644 --- a/app/config/specs/swagger2-1.4.x-console.json +++ b/app/config/specs/swagger2-1.4.x-console.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `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. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","default":"","x-example":"[CODE]"}},"required":["userId","email","password"]}}]}},"\/account\/jwt":{"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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":274,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}]},"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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","default":true,"x-example":false}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":94,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"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"}},"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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}":{"patch":{"summary":"Update String Attribute","operationId":"databasesUpdateStringAttribute","consumes":["application\/json"],"produces":[],"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":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}}}}]}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":91,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":58,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":96,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List 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":52,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":95,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":[],"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"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?","default":true,"x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":226,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","default":true,"x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, statusCode, duration","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","default":false,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","weight":225,"cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":120,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":119,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":121,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":122,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":134,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthSessionsLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","weight":131,"cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordHistory","weight":130,"cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updatePersonalDataCheck","weight":132,"cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":129,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":152,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":151,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":153,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":155,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":154,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":142,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":141,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":143,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":144,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":145,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":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":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":147,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":146,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":null}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":148,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":149,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":124,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/service\/all":{"patch":{"summary":"Update all service status","operationId":"projectsUpdateServiceStatusAll","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatusAll","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 configuration","operationId":"projectsUpdateSmtpConfiguration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateSmtpConfiguration","weight":156,"cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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},"sender":{"type":"string","description":"SMTP sender email","default":null,"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":null,"x-example":null},"username":{"type":"string","description":"SMTP server username","default":null,"x-example":"[USERNAME]"},"password":{"type":"string","description":"SMTP server password","default":null,"x-example":"[PASSWORD]"},"secure":{"type":"string","description":"Does SMTP server use secure connection","default":"","x-example":"tls"}},"required":["enabled","sender","host","port","username","password"]}}]}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateTeam","weight":123,"cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"getEmailTemplate","weight":158,"cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","in":"path"},{"name":"locale","description":"Template locale","required":true,"type":"string","x-example":"af","in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateEmailTemplate","weight":160,"cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","in":"path"},{"name":"locale","description":"Template locale","required":true,"type":"string","x-example":"af","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"},"subject":{"type":"string","description":"Email Subject","default":null,"x-example":"[SUBJECT]"},"message":{"type":"string","description":"Template message","default":null,"x-example":"[MESSAGE]"},"replyTo":{"type":"string","description":"Reply to email","default":"","x-example":"email@example.com"}},"required":["senderName","senderEmail","subject","message"]}}]},"delete":{"summary":"Reset custom email template","operationId":"projectsDeleteEmailTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"deleteEmailTemplate","weight":162,"cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","in":"path"},{"name":"locale","description":"Template locale","required":true,"type":"string","x-example":"af","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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"getSmsTemplate","weight":157,"cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","in":"path"},{"name":"locale","description":"Template locale","required":true,"type":"string","x-example":"af","in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"updateSmsTemplate","weight":159,"cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","in":"path"},{"name":"locale","description":"Template locale","required":true,"type":"string","x-example":"af","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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"deleteSmsTemplate","weight":161,"cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","in":"path"},{"name":"locale","description":"Template locale","required":true,"type":"string","x-example":"af","in":"path"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":136,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":135,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":137,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":140,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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"},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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"},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":177,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":192,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":220,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","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":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":"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":[]}],"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"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"]},"account":{"description":"Account","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"},"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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","accessedAt"]},"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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"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":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"smtpEnabled":{"type":"boolean","description":"Status for custom SMTP","x-example":false},"smtpSender":{"type":"string","description":"SMTP sender email","x-example":"john@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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL 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","providers","platforms","webhooks","keys","domains","smtpEnabled","smtpSender","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions","serviceStatusForGraphql"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain 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"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","filesStorage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]},"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"}},"required":["_APP_DOMAIN_TARGET","_APP_STORAGE_LIMIT","_APP_FUNCTIONS_SIZE_LIMIT","_APP_USAGE_STATS"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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","cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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":"string","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"type":"string","x-example":"[IDENTITY_ID]","in":"path"}]}},"\/account\/jwt":{"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","cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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","cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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","cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"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","cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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","cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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","cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](http:\/\/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","cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"chat","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}]},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"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\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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","cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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","cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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","cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}]}},"\/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","cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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"}}},"x-appwrite":{"method":"listLogs","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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","cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","default":"","x-example":"[TEMPLATE_BRANCH]"}},"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","cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"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","cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","node-19.0","node-20.0","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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":"","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]"}},"required":["name","runtime"]}}]},"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","cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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","cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","consumes":["application\/json"],"produces":["*\/*"],"tags":["functions"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"downloadDeployment","cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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","cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","default":[],"x-example":"{}"}}}}]}},"\/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","cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","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","cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/migrations":{"get":{"summary":"List Migrations","operationId":"migrationsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations List","schema":{"$ref":"#\/definitions\/migrationList"}}},"x-appwrite":{"method":"list","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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, resources, statusCounters, resourceData, errors","required":false,"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":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createAppwriteMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getAppwriteReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 (Service Account)","operationId":"migrationsCreateFirebaseMigration","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createFirebaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/deauthorize":{"get":{"summary":"Revoke Appwrite's authorization to access Firebase Projects","operationId":"migrationsDeleteFirebaseAuth","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"deleteFirebaseAuth","cookies":false,"type":"","demo":"migrations\/delete-firebase-auth.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/oauth":{"post":{"summary":"Migrate Firebase Data (OAuth)","operationId":"migrationsCreateFirebaseOAuthMigration","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createFirebaseOAuthMigration","cookies":false,"type":"","demo":"migrations\/create-firebase-o-auth-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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"projectId":{"type":"string","description":"Project ID of the Firebase Project","default":null,"x-example":"[PROJECT_ID]"}},"required":["resources","projectId"]}}]}},"\/migrations\/firebase\/projects":{"get":{"summary":"List Firebase Projects","operationId":"migrationsListFirebaseProjects","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations Firebase Projects List","schema":{"$ref":"#\/definitions\/firebaseProjectList"}}},"x-appwrite":{"method":"listFirebaseProjects","cookies":false,"type":"","demo":"migrations\/list-firebase-projects.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/report":{"get":{"summary":"Generate a report on Firebase Data","operationId":"migrationsGetFirebaseReport","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getFirebaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/firebase\/report\/oauth":{"get":{"summary":"Generate a report on Firebase Data using OAuth","operationId":"migrationsGetFirebaseReportOAuth","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getFirebaseReportOAuth","cookies":false,"type":"","demo":"migrations\/get-firebase-report-o-auth.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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"projectId","description":"Project ID","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"query"}]}},"\/migrations\/nhost":{"post":{"summary":"Migrate NHost Data","operationId":"migrationsCreateNHostMigration","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createNHostMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getNHostReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createSupabaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getSupabaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"retry","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"migrations\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-migration.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthSessionsLimit","cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordHistory","cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updatePersonalDataCheck","cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","enum":["email-password","magic-url","anonymous","invites","jwt","phone"],"x-enum-name":null,"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}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","zoom","mock"],"x-enum-name":null,"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":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"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":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","vcs","functions","proxy","graphql","migrations"],"x-enum-name":null,"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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatusAll","cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 configuration","operationId":"projectsUpdateSmtpConfiguration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateSmtpConfiguration","cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"x-enum-keys":[]}},"required":["enabled"]}}]}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateTeam","cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"getEmailTemplate","cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateEmailTemplate","cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"deleteEmailTemplate","cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"getSmsTemplate","cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"updateSmsTemplate","cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"deleteSmsTemplate","cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Rule","schema":{"$ref":"#\/definitions\/proxyRule"}}},"x-appwrite":{"method":"updateRuleVerification","cookies":false,"type":"","demo":"proxy\/update-rule-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"rules.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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","cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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","cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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","cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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","cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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","cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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","cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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","cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembership","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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 usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Provider Repositories List","schema":{"$ref":"#\/definitions\/providerRepositoryList"}}},"x-appwrite":{"method":"listRepositories","cookies":false,"type":"","demo":"vcs\/list-repositories.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"ProviderRepository","schema":{"$ref":"#\/definitions\/providerRepository"}}},"x-appwrite":{"method":"createRepository","cookies":false,"type":"","demo":"vcs\/create-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"ProviderRepository","schema":{"$ref":"#\/definitions\/providerRepository"}}},"x-appwrite":{"method":"getRepository","cookies":false,"type":"","demo":"vcs\/get-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Branches List","schema":{"$ref":"#\/definitions\/branchList"}}},"x-appwrite":{"method":"listRepositoryBranches","cookies":false,"type":"","demo":"vcs\/list-repository-branches.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/detection":{"post":{"summary":"Detect runtime settings from source code","operationId":"vcsCreateRepositoryDetection","consumes":["application\/json"],"produces":["application\/json"],"tags":["vcs"],"description":"","responses":{"200":{"description":"Detection","schema":{"$ref":"#\/definitions\/detection"}}},"x-appwrite":{"method":"createRepositoryDetection","cookies":false,"type":"","demo":"vcs\/create-repository-detection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":[],"tags":["vcs"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"updateExternalDeployments","cookies":false,"type":"","demo":"vcs\/update-external-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Installations List","schema":{"$ref":"#\/definitions\/installationList"}}},"x-appwrite":{"method":"listInstallations","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Installation","schema":{"$ref":"#\/definitions\/installation"}}},"x-appwrite":{"method":"getInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":[]}],"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"]},"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"]},"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"]},"firebaseProjectList":{"description":"Migrations Firebase 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\/firebaseProject"},"x-example":""}},"required":["total","projects"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"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"]},"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"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForVcs":{"type":"boolean","description":"VCS service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForProxy":{"type":"boolean","description":"Proxy service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL service status","x-example":true},"serviceStatusForMigrations":{"type":"boolean","description":"Migrations 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","providers","platforms","webhooks","keys","smtpEnabled","smtpSenderName","smtpSenderEmail","smtpReplyTo","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForVcs","serviceStatusForFunctions","serviceStatusForProxy","serviceStatusForGraphql","serviceStatusForMigrations"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","storage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsFailure":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsSuccess":{"type":"array","description":"Aggregated stats for function execution successes.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsFailure":{"type":"array","description":"Aggregated stats for function build failures.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsSuccess":{"type":"array","description":"Aggregated stats for function build successes.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build duration.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","executionsTotal","executionsFailure","executionsSuccess","executionsTime","buildsTotal","buildsFailure","buildsSuccess","buildsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databases":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buckets":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requests","network","executions","documents","databases","users","storage","buckets"]},"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"]},"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"]},"migration":{"description":"Migration","type":"object","properties":{"$id":{"type":"string","description":"Migration 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"},"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"},"resources":{"type":"array","description":"Resources to migration.","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":"string","description":"All errors that occurred during the migration process.","x-example":[]}},"required":["$id","$createdAt","$updatedAt","status","stage","source","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"]},"firebaseProject":{"description":"MigrationFirebaseProject","type":"object","properties":{"projectId":{"type":"string","description":"Project ID.","x-example":"my-project"},"displayName":{"type":"string","description":"Project display name.","x-example":"My Project"}},"required":["projectId","displayName"]}},"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.4.x-server.json b/app/config/specs/swagger2-1.4.x-server.json index e7b1bedfee..fc50cbbe5b 100644 --- a/app/config/specs/swagger2-1.4.x-server.json +++ b/app/config/specs/swagger2-1.4.x-server.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"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"}},"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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}":{"patch":{"summary":"Update String Attribute","operationId":"databasesUpdateStringAttribute","consumes":["application\/json"],"produces":[],"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":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}}}}]}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":[],"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"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?","default":true,"x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","default":true,"x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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, statusCode, duration","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","default":false,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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"},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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"},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"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":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":"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":[]}],"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"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":"string","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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"type":"string","x-example":"[IDENTITY_ID]","in":"path"}]}},"\/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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update 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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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"]}}]}},"\/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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":52,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":51,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"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":53,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":55,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":58,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":57,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":59,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":62,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":73,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":70,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":71,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":83,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":69,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":68,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":72,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":63,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":74,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":85,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":84,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}]}},"\/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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":87,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":86,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":88,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":89,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":238,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":237,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","default":"","x-example":"[TEMPLATE_BRANCH]"}},"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":239,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":243,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","node-19.0","node-20.0","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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":"","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]"}},"required":["name","runtime"]}}]},"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":246,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":248,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":247,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","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":249,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":245,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":250,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":251,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","consumes":["application\/json"],"produces":["*\/*"],"tags":["functions"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"downloadDeployment","weight":244,"cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","default":[],"x-example":"{}"}}}}]}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":256,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":255,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":257,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":258,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":259,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":119,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":112,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":111,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":117,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":118,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":113,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":168,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":169,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":171,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update 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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":204,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":196,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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":223,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":201,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":202,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":203,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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":205,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":222,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","weight":212,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":209,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":215,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":206,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":219,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":221,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":220,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":218,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":[]}],"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"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 41b0693be4..1b291408f0 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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 platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/console\/assistant":{"post":{"summary":"Ask Query","operationId":"assistantChat","consumes":["application\/json"],"produces":["text\/plain"],"tags":["assistant"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"chat","weight":275,"cookies":false,"type":"","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":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"query":{"type":"string","description":"Query","default":null,"x-example":"[QUERY]"}},"required":["query"]}}]}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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, statusCode, duration","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","default":false,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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"]}}]}},"\/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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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"]}}]}}},"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":"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":[]}],"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"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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":"string","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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"type":"string","x-example":"[IDENTITY_ID]","in":"path"}]}},"\/account\/jwt":{"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":20,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":19,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":15,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":16,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":17,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":18,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","default":[],"x-example":"{}"}}}}]}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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"]}}]}},"\/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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[]}},"security":[{"Project":[],"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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: name, total","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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"]}}]}}},"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":[]}],"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"]},"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"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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"]},"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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","roles"]},"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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 39e075fcd1..cf2b52db4b 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":7,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `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. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","default":"","x-example":"[CODE]"}},"required":["userId","email","password"]}}]}},"\/account\/jwt":{"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":18,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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 currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":17,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":13,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":14,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":9,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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 platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user 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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"chat","weight":275,"cookies":false,"type":"","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":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"query":{"type":"string","description":"Query","default":null,"x-example":"[QUERY]"}},"required":["query"]}}]}},"\/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":274,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}]},"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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","default":true,"x-example":false}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":94,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}":{"patch":{"summary":"Update String Attribute","operationId":"databasesUpdateStringAttribute","consumes":["application\/json"],"produces":[],"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":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}]}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":91,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":58,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":96,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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"}}},"x-appwrite":{"method":"listLogs","weight":52,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":95,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":[],"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","php-8.0","php-8.1","ruby-3.0","ruby-3.1","python-3.8","python-3.9","python-3.10","dart-2.15","dart-2.16","dart-2.17","dotnet-3.1","dotnet-6.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","kotlin-1.6","cpp-17.0"],"x-enum-name":null,"x-enum-keys":[]},"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?","default":true,"x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":226,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","default":true,"x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, statusCode, duration","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","default":false,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","weight":225,"cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d","in":"query"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":120,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":119,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":121,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":122,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":134,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthSessionsLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","weight":131,"cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordHistory","weight":130,"cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updatePersonalDataCheck","weight":132,"cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":129,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","enum":["email-password","magic-url","anonymous","invites","jwt","phone"],"x-enum-name":null,"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}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":152,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":151,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":153,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":155,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":154,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":142,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":141,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":143,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":144,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":145,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","zoom","mock"],"x-enum-name":null,"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":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":147,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":146,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"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":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":148,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":149,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":124,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatusAll","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 configuration","operationId":"projectsUpdateSmtpConfiguration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateSmtpConfiguration","weight":156,"cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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},"sender":{"type":"string","description":"SMTP sender email","default":null,"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":null,"x-example":null},"username":{"type":"string","description":"SMTP server username","default":null,"x-example":"[USERNAME]"},"password":{"type":"string","description":"SMTP server password","default":null,"x-example":"[PASSWORD]"},"secure":{"type":"string","description":"Does SMTP server use secure connection","default":"","x-example":"tls","enum":["tls"],"x-enum-name":null,"x-enum-keys":[]}},"required":["enabled","sender","host","port","username","password"]}}]}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateTeam","weight":123,"cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"getEmailTemplate","weight":158,"cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateEmailTemplate","weight":160,"cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"},"subject":{"type":"string","description":"Email Subject","default":null,"x-example":"[SUBJECT]"},"message":{"type":"string","description":"Template message","default":null,"x-example":"[MESSAGE]"},"replyTo":{"type":"string","description":"Reply to email","default":"","x-example":"email@example.com"}},"required":["senderName","senderEmail","subject","message"]}}]},"delete":{"summary":"Reset custom email template","operationId":"projectsDeleteEmailTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"deleteEmailTemplate","weight":162,"cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"getSmsTemplate","weight":157,"cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"updateSmsTemplate","weight":159,"cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"deleteSmsTemplate","weight":161,"cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":136,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":135,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":137,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":140,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":177,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":192,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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 usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":220,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":"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":[]}],"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"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"]},"account":{"description":"Account","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"},"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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","accessedAt"]},"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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"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":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"smtpEnabled":{"type":"boolean","description":"Status for custom SMTP","x-example":false},"smtpSender":{"type":"string","description":"SMTP sender email","x-example":"john@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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL 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","providers","platforms","webhooks","keys","domains","smtpEnabled","smtpSender","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions","serviceStatusForGraphql"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain 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"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","filesStorage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]},"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"}},"required":["_APP_DOMAIN_TARGET","_APP_STORAGE_LIMIT","_APP_FUNCTIONS_SIZE_LIMIT","_APP_USAGE_STATS"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"},"password":{"type":"string","description":"New user password. Must be at least 8 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","cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","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":"string","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"type":"string","x-example":"[IDENTITY_ID]","in":"path"}]}},"\/account\/jwt":{"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","cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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","cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"]}}]}},"\/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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","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"},"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","cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"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","cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. 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 [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create 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](\/docs\/authentication-security#limits).\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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, 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","zoom","mock"],"x-enum-name":"Provider","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":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","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 [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](\/docs\/authentication-security#limits).","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-phone}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session","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","cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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","cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](http:\/\/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","cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"chat","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}]},"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"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\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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","cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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","cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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","cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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","cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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","cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}]}},"\/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","cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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","cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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"}}},"x-appwrite":{"method":"listLogs","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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","cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","default":"","x-example":"[TEMPLATE_BRANCH]"}},"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","cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"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","cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","node-19.0","node-20.0","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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":"","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]"}},"required":["name","runtime"]}}]},"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","cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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","cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","consumes":["application\/json"],"produces":["*\/*"],"tags":["functions"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"downloadDeployment","cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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","cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","default":[],"x-example":"{}"}}}}]}},"\/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","cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","cookies":false,"type":"","demo":"functions\/get-function-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","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","cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","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","cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/migrations":{"get":{"summary":"List Migrations","operationId":"migrationsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations List","schema":{"$ref":"#\/definitions\/migrationList"}}},"x-appwrite":{"method":"list","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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, resources, statusCounters, resourceData, errors","required":false,"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":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createAppwriteMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getAppwriteReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 (Service Account)","operationId":"migrationsCreateFirebaseMigration","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createFirebaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/deauthorize":{"get":{"summary":"Revoke Appwrite's authorization to access Firebase Projects","operationId":"migrationsDeleteFirebaseAuth","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"deleteFirebaseAuth","cookies":false,"type":"","demo":"migrations\/delete-firebase-auth.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/oauth":{"post":{"summary":"Migrate Firebase Data (OAuth)","operationId":"migrationsCreateFirebaseOAuthMigration","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createFirebaseOAuthMigration","cookies":false,"type":"","demo":"migrations\/create-firebase-o-auth-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,"offline-model":"","offline-key":"","offline-response-key":"$id","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"}},"projectId":{"type":"string","description":"Project ID of the Firebase Project","default":null,"x-example":"[PROJECT_ID]"}},"required":["resources","projectId"]}}]}},"\/migrations\/firebase\/projects":{"get":{"summary":"List Firebase Projects","operationId":"migrationsListFirebaseProjects","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migrations Firebase Projects List","schema":{"$ref":"#\/definitions\/firebaseProjectList"}}},"x-appwrite":{"method":"listFirebaseProjects","cookies":false,"type":"","demo":"migrations\/list-firebase-projects.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/migrations\/firebase\/report":{"get":{"summary":"Generate a report on Firebase Data","operationId":"migrationsGetFirebaseReport","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getFirebaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/firebase\/report\/oauth":{"get":{"summary":"Generate a report on Firebase Data using OAuth","operationId":"migrationsGetFirebaseReportOAuth","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getFirebaseReportOAuth","cookies":false,"type":"","demo":"migrations\/get-firebase-report-o-auth.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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"projectId","description":"Project ID","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"query"}]}},"\/migrations\/nhost":{"post":{"summary":"Migrate NHost Data","operationId":"migrationsCreateNHostMigration","consumes":["application\/json"],"produces":["application\/json"],"tags":["migrations"],"description":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createNHostMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getNHostReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"createSupabaseMigration","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration Report","schema":{"$ref":"#\/definitions\/migrationReport"}}},"x-appwrite":{"method":"getSupabaseReport","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"202":{"description":"Migration","schema":{"$ref":"#\/definitions\/migration"}}},"x-appwrite":{"method":"retry","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"migrations\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-migration.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"migrations.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"project\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]}},"\/projects\/{projectId}\/auth\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","cookies":false,"type":"","demo":"projects\/update-auth-duration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthSessionsLimit","cookies":false,"type":"","demo":"projects\/update-auth-sessions-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordDictionary","cookies":false,"type":"","demo":"projects\/update-auth-password-dictionary.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthPasswordHistory","cookies":false,"type":"","demo":"projects\/update-auth-password-history.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updatePersonalDataCheck","cookies":false,"type":"","demo":"projects\/update-personal-data-check.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","enum":["email-password","magic-url","anonymous","invites","jwt","phone"],"x-enum-name":null,"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}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","zoom","mock"],"x-enum-name":null,"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":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"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":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","vcs","functions","proxy","graphql","migrations"],"x-enum-name":null,"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":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatusAll","cookies":false,"type":"","demo":"projects\/update-service-status-all.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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 configuration","operationId":"projectsUpdateSmtpConfiguration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateSmtpConfiguration","cookies":false,"type":"","demo":"projects\/update-smtp-configuration.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"x-enum-keys":[]}},"required":["enabled"]}}]}},"\/projects\/{projectId}\/team":{"patch":{"summary":"Update Project Team","operationId":"projectsUpdateTeam","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateTeam","cookies":false,"type":"","demo":"projects\/update-team.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"getEmailTemplate","cookies":false,"type":"","demo":"projects\/get-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]},"patch":{"summary":"Update custom email templates","operationId":"projectsUpdateEmailTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateEmailTemplate","cookies":false,"type":"","demo":"projects\/update-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"EmailTemplate","schema":{"$ref":"#\/definitions\/emailTemplate"}}},"x-appwrite":{"method":"deleteEmailTemplate","cookies":false,"type":"","demo":"projects\/delete-email-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"getSmsTemplate","cookies":false,"type":"","demo":"projects\/get-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]},"patch":{"summary":"Update custom SMS template","operationId":"projectsUpdateSmsTemplate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"updateSmsTemplate","cookies":false,"type":"","demo":"projects\/update-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"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":"","responses":{"200":{"description":"SmsTemplate","schema":{"$ref":"#\/definitions\/smsTemplate"}}},"x-appwrite":{"method":"deleteSmsTemplate","cookies":false,"type":"","demo":"projects\/delete-sms-template.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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"],"x-enum-name":null,"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":null,"x-enum-keys":[],"in":"path"}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":[],"default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Rule","schema":{"$ref":"#\/definitions\/proxyRule"}}},"x-appwrite":{"method":"updateRuleVerification","cookies":false,"type":"","demo":"proxy\/update-rule-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"rules.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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","cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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","cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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","cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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","cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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","cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","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","cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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","cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembership","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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","cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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 usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","enum":["24h","7d","30d","90d"],"x-enum-name":null,"x-enum-keys":["Twenty Four Hours","Seven Days","Thirty Days","Ninety Days"],"default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Provider Repositories List","schema":{"$ref":"#\/definitions\/providerRepositoryList"}}},"x-appwrite":{"method":"listRepositories","cookies":false,"type":"","demo":"vcs\/list-repositories.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"ProviderRepository","schema":{"$ref":"#\/definitions\/providerRepository"}}},"x-appwrite":{"method":"createRepository","cookies":false,"type":"","demo":"vcs\/create-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"ProviderRepository","schema":{"$ref":"#\/definitions\/providerRepository"}}},"x-appwrite":{"method":"getRepository","cookies":false,"type":"","demo":"vcs\/get-repository.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Branches List","schema":{"$ref":"#\/definitions\/branchList"}}},"x-appwrite":{"method":"listRepositoryBranches","cookies":false,"type":"","demo":"vcs\/list-repository-branches.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.read","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/detection":{"post":{"summary":"Detect runtime settings from source code","operationId":"vcsCreateRepositoryDetection","consumes":["application\/json"],"produces":["application\/json"],"tags":["vcs"],"description":"","responses":{"200":{"description":"Detection","schema":{"$ref":"#\/definitions\/detection"}}},"x-appwrite":{"method":"createRepositoryDetection","cookies":false,"type":"","demo":"vcs\/create-repository-detection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":[],"tags":["vcs"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"updateExternalDeployments","cookies":false,"type":"","demo":"vcs\/update-external-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"vcs.write","platforms":["console"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Installations List","schema":{"$ref":"#\/definitions\/installationList"}}},"x-appwrite":{"method":"listInstallations","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"200":{"description":"Installation","schema":{"$ref":"#\/definitions\/installation"}}},"x-appwrite":{"method":"getInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteInstallation","cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":[]}],"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"]},"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"]},"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"]},"firebaseProjectList":{"description":"Migrations Firebase 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\/firebaseProject"},"x-example":""}},"required":["total","projects"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"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"]},"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"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"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"},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForVcs":{"type":"boolean","description":"VCS service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true},"serviceStatusForProxy":{"type":"boolean","description":"Proxy service status","x-example":true},"serviceStatusForGraphql":{"type":"boolean","description":"GraphQL service status","x-example":true},"serviceStatusForMigrations":{"type":"boolean","description":"Migrations 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","providers","platforms","webhooks","keys","smtpEnabled","smtpSenderName","smtpSenderEmail","smtpReplyTo","smtpHost","smtpPort","smtpUsername","smtpPassword","smtpSecure","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForVcs","serviceStatusForFunctions","serviceStatusForProxy","serviceStatusForGraphql","serviceStatusForMigrations"]},"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"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"]},"provider":{"description":"Provider","type":"object","properties":{"key":{"type":"string","description":"Provider.","x-example":"github"},"name":{"type":"string","description":"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":"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"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","storage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsFailure":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsSuccess":{"type":"array","description":"Aggregated stats for function execution successes.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsFailure":{"type":"array","description":"Aggregated stats for function build failures.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsSuccess":{"type":"array","description":"Aggregated stats for function build successes.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build duration.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","executionsTotal","executionsFailure","executionsSuccess","executionsTime","buildsTotal","buildsFailure","buildsSuccess","buildsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databases":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buckets":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requests","network","executions","documents","databases","users","storage","buckets"]},"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"]},"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"]},"migration":{"description":"Migration","type":"object","properties":{"$id":{"type":"string","description":"Migration 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"},"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"},"resources":{"type":"array","description":"Resources to migration.","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":"string","description":"All errors that occurred during the migration process.","x-example":[]}},"required":["$id","$createdAt","$updatedAt","status","stage","source","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"]},"firebaseProject":{"description":"MigrationFirebaseProject","type":"object","properties":{"projectId":{"type":"string","description":"Project ID.","x-example":"my-project"},"displayName":{"type":"string","description":"Project display name.","x-example":"My Project"}},"required":["projectId","displayName"]}},"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 ece98a393e..fc50cbbe5b 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.3.8","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":19,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":26,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":22,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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\/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":24,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update 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":25,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":20,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":28,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":33,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":34,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"List Sessions","operationId":"accountListSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"listSessions","weight":21,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":32,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":23,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":30,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":39,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":43,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":41,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":44,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":50,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":49,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"name":{"type":"string","description":"Database name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"enabled":{"type":"boolean","description":"Is database enabled?","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":51,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":53,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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?","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":54,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":55,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":57,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":59,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","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":60,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":71,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":68,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":69,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":62,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":74,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":70,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}":{"patch":{"summary":"Update String Attribute","operationId":"databasesUpdateStringAttribute","consumes":["application\/json"],"produces":[],"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":73,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":65,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":72,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":83,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}]}},"\/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":89,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":88,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":90,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":92,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":93,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":85,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":84,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":86,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":87,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":222,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":221,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":[],"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","php-8.0","php-8.1","ruby-3.0","ruby-3.1","python-3.8","python-3.9","python-3.10","dart-2.15","dart-2.16","dart-2.17","dotnet-3.1","dotnet-6.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","kotlin-1.6","cpp-17.0"],"x-enum-name":null,"x-enum-keys":[]},"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?","default":true,"x-example":false}},"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":223,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":224,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":227,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). 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?","default":true,"x-example":false}},"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":229,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":231,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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: entrypoint, size, buildId, activate","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](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":230,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":232,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":228,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":233,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":234,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":236,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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, statusCode, duration","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":235,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},userId:{userId}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code in the background. Default value is false.","default":false,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":237,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":239,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":238,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":241,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":242,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":273,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":272,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":105,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":117,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":108,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":107,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":109,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":116,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":97,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":98,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":99,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":165,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":164,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":166,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](\/docs\/environment-variables#storage)","default":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":168,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":169,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":171,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":175,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":176,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":172,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":174,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":180,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":179,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/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":181,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update 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":183,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":186,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":188,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":191,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":190,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":182,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":184,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":201,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":193,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":196,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":194,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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\/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](\/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":195,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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":202,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":219,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","weight":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":206,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":205,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":212,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":203,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":204,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":218,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":215,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":"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":[]}],"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"]},"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"]},"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":"Database enabled.","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](\/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.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"$createdAt":{"type":"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"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 schedult in CRON format.","x-example":"5 4 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":15,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"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"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. 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":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.4.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get the currently logged in user.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":21,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":28,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/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":13,"cookies":false,"type":"","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,"offline-model":"\/account\/identities","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":"string","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":14,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"identityId","description":"Identity ID.","required":true,"type":"string","x-example":"[IDENTITY_ID]","in":"path"}]}},"\/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":24,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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\/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":26,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update 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":27,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":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](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":29,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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"]}}]}},"\/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":22,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":30,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/prefs","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":35,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":36,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"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":23,"cookies":false,"type":"","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,"offline-model":"\/account\/sessions","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":34,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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":25,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"\/account\/sessions","offline-key":"{sessionId}","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":33,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete 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](\/docs\/client\/account#accountDeleteSessions) instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":32,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update 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":31,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). 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":39,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":40,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":42,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":41,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","enum":["amex","argencard","cabal","censosud","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","Consosud","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":45,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http:\/\/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":43,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","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","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","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","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":44,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":47,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"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":46,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"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":52,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":51,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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]","x-global":true},"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":53,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":55,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":56,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":58,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":57,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":59,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":61,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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](\/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":62,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":73,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":70,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"updateBooleanAttribute","weight":82,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":71,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 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":[],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"updateDatetimeAttribute","weight":83,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":64,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":76,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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":[],"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":77,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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 4096 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}},"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":69,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":81,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":68,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":80,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":66,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":78,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"202":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"createRelationshipAttribute","weight":72,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":63,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":75,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"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":67,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"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":79,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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}},"required":["required","default"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or 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":74,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":85,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[],"tags":["databases"],"description":"Update relationship attribute. [Learn more about relationship attributes](\/docs\/databases-relationships#relationship-attributes).\n","responses":{"200":{"description":"AttributeRelationship","schema":{"$ref":"#\/definitions\/attributeRelationship"}}},"x-appwrite":{"method":"updateRelationshipAttribute","weight":84,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":[]}}}}]}},"\/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":91,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":90,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":92,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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\/databases#querying-documents). Only method allowed is select.","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":94,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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](\/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":95,"cookies":false,"type":"","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,"offline-model":"\/databases\/{databaseId}\/collections\/{collectionId}\/documents","offline-key":"{documentId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":87,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":86,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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","spatial","array"],"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":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":88,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":89,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":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":238,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":237,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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]"},"templateBranch":{"type":"string","description":"Production branch for the repo linked to the function template.","default":"","x-example":"[TEMPLATE_BRANCH]"}},"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":239,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":240,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":243,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"x-example":"node-14.5","enum":["node-14.5","node-16.0","node-18.0","node-19.0","node-20.0","php-8.0","php-8.1","php-8.2","ruby-3.0","ruby-3.1","ruby-3.2","python-3.8","python-3.9","python-3.10","python-3.11","dart-2.15","dart-2.16","dart-2.17","dart-2.18","dart-3.0","dotnet-3.1","dotnet-6.0","dotnet-7.0","java-8.0","java-11.0","java-17.0","java-18.0","swift-5.5","swift-5.8","kotlin-1.6","kotlin-1.8","cpp-17","cpp-20"],"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]"},"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":"","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]"}},"required":["name","runtime"]}}]},"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":246,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":248,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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](\/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":247,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"offline-model":"","offline-key":"","offline-response-key":"$id","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":249,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":245,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":250,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":251,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/download":{"get":{"summary":"Download Deployment","operationId":"functionsDownloadDeployment","consumes":["application\/json"],"produces":["*\/*"],"tags":["functions"],"description":"","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"downloadDeployment","weight":244,"cookies":false,"type":"location","demo":"functions\/download-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/download-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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":253,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":252,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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":null,"x-enum-keys":[]},"headers":{"type":"object","description":"HTTP headers of execution. Defaults to empty.","default":[],"x-example":"{}"}}}}]}},"\/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":254,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/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":256,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":255,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":257,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":258,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":259,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":293,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":292,"cookies":false,"type":"graphql","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":119,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":112,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":111,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":117,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":118,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":113,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":99,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/localed","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":100,"cookies":false,"type":"","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,"offline-model":"\/locale\/localeCode","offline-key":"current","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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":104,"cookies":false,"type":"","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,"offline-model":"\/locale\/continents","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":101,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":102,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/eu","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":103,"cookies":false,"type":"","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,"offline-model":"\/locale\/countries\/phones","offline-key":"","offline-response-key":"countryCode","auth":{"Project":[],"Key":[]}},"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":105,"cookies":false,"type":"","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,"offline-model":"\/locale\/currencies","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"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":106,"cookies":false,"type":"","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,"offline-model":"\/locale\/languages","offline-key":"","offline-response-key":"code","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":168,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":167,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":30000000,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":169,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":170,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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](\/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":null,"x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"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":171,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":173,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"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](\/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":172,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose 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](\/docs\/storage#file-input).","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](\/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":174,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":178,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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](\/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":179,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":176,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","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"],"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":177,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":183,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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","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":182,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/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":184,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update 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":186,"cookies":false,"type":"","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,"offline-model":"\/teams","offline-key":"{teamId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":190,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"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](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) 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":189,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":"","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](\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":191,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"offline-model":"\/teams\/{teamId}\/memberships","offline-key":"{membershipId}","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership","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](\/docs\/permissions).\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembership","weight":192,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":194,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":193,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/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](\/docs\/client\/account#accountGetPrefs).","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":185,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":187,"cookies":false,"type":"","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,"offline-model":"\/teams\/{teamId}\/prefs","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"JWT":[]}},"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":204,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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","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":196,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":199,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":197,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":210,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":"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":223,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":198,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":201,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":202,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":203,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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](\/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":200,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":null,"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":205,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":222,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":216,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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}\/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](\/docs\/permissions) for more info.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateLabels","weight":212,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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 5 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":209,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":208,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","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":214,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":215,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":217,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":206,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":219,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":207,"cookies":false,"type":"","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,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":221,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":220,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":211,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":218,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","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":213,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"offline-model":"","offline-key":"","offline-response-key":"$id","auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","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":[]}],"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"]},"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](\/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](\/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},"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","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},"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"]},"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},"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"]},"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},"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"]},"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},"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","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},"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","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},"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","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},"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","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},"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","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},"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","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}},"required":["key","type","status","error","attributes"]},"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](\/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},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}},"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","prefs","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"},"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}},"required":["$id","$createdAt","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"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"}},"required":["$id","$createdAt","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the 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](\/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](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/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.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"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},"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","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"},"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 schedult 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}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","live","logging","runtime","deployment","vars","events","schedule","timeout","entrypoint","commands","version","installationId","providerRepositoryId","providerBranch","providerRootDirectory","providerSilentMode"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"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"},"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","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":"Developers are awesome."},"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"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","requestMethod","requestPath","requestHeaders","responseStatusCode","responseBody","responseHeaders","logs","errors","duration"]},"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"]},"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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/variables.php b/app/config/variables.php index c04ba339e5..b39eb9c41d 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -61,6 +61,15 @@ return [ 'question' => 'Enter your Appwrite hostname', 'filter' => '' ], + [ + 'name' => '_APP_DOMAIN_FUNCTIONS', + 'description' => 'A domain to use for function preview URLs. Setting to empty turns off function preview URLs.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], [ 'name' => '_APP_DOMAIN_TARGET', 'description' => 'A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite \'_APP_DOMAIN\' variable. The default value is \'localhost\'.', @@ -105,15 +114,6 @@ return [ 'question' => '', 'filter' => '' ], - [ - 'name' => '_APP_CONSOLE_ROOT_SESSION', - 'description' => 'Domain policy for the Appwrite console session cookie. By default, set to \'disabled\', meaning the session cookie will be set to the domain of the Appwrite console (e.g. cloud.appwrite.io). When set to \'enabled\', the session cookie will be set to the registerable domain of the Appwrite server (e.g. appwrite.io).', - 'introduction' => '', - 'default' => 'disabled', - 'required' => false, - 'question' => '', - 'filter' => '' - ], [ 'name' => '_APP_SYSTEM_EMAIL_NAME', 'description' => 'This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: \'Appwrite\'. You can use url encoded strings for spaces and special chars.', @@ -152,7 +152,7 @@ return [ ], [ 'name' => '_APP_USAGE_STATS', - 'description' => 'This variable allows you to disable the collection and displaying of usage stats. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'. When disabled, it\'s recommended to turn off the Worker Usage container for better resource usage.', + 'description' => 'This variable allows you to disable the collection and displaying of usage stats. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'. When disabled, it\'s recommended to turn off the Worker Usage container to reduce resource usage.', 'introduction' => '0.7.0', 'default' => 'enabled', 'required' => false, @@ -161,7 +161,7 @@ return [ ], [ 'name' => '_APP_LOGGING_PROVIDER', - 'description' => 'This variable allows you to enable logging errors to 3rd party providers. This value is empty by default, to enable the logger set the value to one of \'sentry\', \'raygun\', \'appSignal\', \'logOwl\'', + 'description' => 'This variable allows you to enable logging errors to 3rd party providers. This value is empty by default, set the value to one of \'sentry\', \'raygun\', \'appSignal\', \'logOwl\' to enable the logger.', 'introduction' => '0.12.0', 'default' => '', 'required' => false, @@ -213,15 +213,6 @@ return [ 'question' => '', 'filter' => '' ], - [ - 'name' => '_APP_CONSOLE_INVITES', - 'description' => 'This option allows you to disable the invitation of new users to the Appwrite console. When enabled, console users are allowed to invite new users to a project. By default this option is enabled.', - 'introduction' => '1.2.0', - 'default' => 'enabled', - 'required' => false, - 'question' => '', - 'filter' => '' - ], ], ], [ @@ -324,33 +315,54 @@ return [ 'question' => '', 'filter' => 'password' ], + ], + ], + [ + 'category' => 'InfluxDB', + 'description' => 'Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container.', + 'variables' => [ [ - 'name' => '_APP_CONNECTIONS_MAX', - 'description' => 'MariaDB server maximum connections.', - 'introduction' => 'TBD', - 'default' => 251, + 'name' => '_APP_INFLUXDB_HOST', + 'description' => 'InfluxDB server host name address. Default value is: \'influxdb\'.', + 'introduction' => '', + 'default' => 'influxdb', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_INFLUXDB_PORT', + 'description' => 'InfluxDB server TCP port. Default value is: \'8086\'.', + 'introduction' => '', + 'default' => '8086', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + ], + ], + [ + 'category' => 'StatsD', + 'description' => 'Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container.', + 'variables' => [ + [ + 'name' => '_APP_STATSD_HOST', + 'description' => 'StatsD server host name address. Default value is: \'telegraf\'.', + 'introduction' => '', + 'default' => 'telegraf', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_STATSD_PORT', + 'description' => 'StatsD server TCP port. Default value is: \'8125\'.', + 'introduction' => '', + 'default' => '8125', 'required' => false, 'question' => '', 'filter' => '' ], -// [ -// 'name' => '_APP_CONNECTIONS_DB_PROJECT', -// 'description' => 'A list of comma-separated key value pairs representing Project DBs where key is the database name and value is the DSN connection string.', -// 'introduction' => 'TBD', -// 'default' => 'db_fra1_01=mysql://user:password@mariadb:3306/appwrite', -// 'required' => true, -// 'question' => '', -// 'filter' => '' -// ], -// [ -// 'name' => '_APP_CONNECTIONS_DB_CONSOLE', -// 'description' => 'A key value pair representing the Console DB where key is the database name and value is the DSN connection string.', -// 'introduction' => 'TBD', -// 'default' => 'db_fra1_01=mysql://user:password@mariadb:3306/appwrite', -// 'required' => true, -// 'question' => '', -// 'filter' => '' -// ] ], ], [ @@ -477,17 +489,9 @@ return [ 'question' => '', 'filter' => '' ], - [ - 'name' => '_APP_CONNECTIONS_STORAGE', - 'description' => 'A DSN representing the storage device to connect to. The DSN takes the following format ://:@:/?region=. For example, for S3: \'s3://access_key:access_secret@host:port/bucket?region=us-east-1\'. To use the local filesystem, you can leave this variable empty. Available devices are local, s3, dospaces, linode, backblaze and wasabi.', - 'introduction' => '1.1.0', - 'default' => '', - 'required' => false, - 'question' => '', - ], [ 'name' => '_APP_STORAGE_DEVICE', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Select default storage device. The default value is \'local\'. List of supported adapters are \'local\', \'s3\', \'dospaces\', \'backblaze\', \'linode\' and \'wasabi\'.', 'introduction' => '0.13.0', 'default' => 'local', 'required' => false, @@ -495,7 +499,7 @@ return [ ], [ 'name' => '_APP_STORAGE_S3_ACCESS_KEY', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'AWS S3 storage access key. Required when the storage adapter is set to S3. You can get your access key from your AWS console', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -503,7 +507,7 @@ return [ ], [ 'name' => '_APP_STORAGE_S3_SECRET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'AWS S3 storage secret key. Required when the storage adapter is set to S3. You can get your secret key from your AWS console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -511,7 +515,7 @@ return [ ], [ 'name' => '_APP_STORAGE_S3_REGION', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'AWS S3 storage region. Required when storage adapter is set to S3. You can find your region info for your bucket from AWS console.', 'introduction' => '0.13.0', 'default' => 'us-east-1', 'required' => false, @@ -519,7 +523,7 @@ return [ ], [ 'name' => '_APP_STORAGE_S3_BUCKET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'AWS S3 storage bucket. Required when storage adapter is set to S3. You can create buckets in your AWS console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -527,7 +531,7 @@ return [ ], [ 'name' => '_APP_STORAGE_DO_SPACES_ACCESS_KEY', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'DigitalOcean spaces access key. Required when the storage adapter is set to DOSpaces. You can get your access key from your DigitalOcean console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -535,7 +539,7 @@ return [ ], [ 'name' => '_APP_STORAGE_DO_SPACES_SECRET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'DigitalOcean spaces secret key. Required when the storage adapter is set to DOSpaces. You can get your secret key from your DigitalOcean console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -543,7 +547,7 @@ return [ ], [ 'name' => '_APP_STORAGE_DO_SPACES_REGION', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'DigitalOcean spaces region. Required when storage adapter is set to DOSpaces. You can find your region info for your space from DigitalOcean console.', 'introduction' => '0.13.0', 'default' => 'us-east-1', 'required' => false, @@ -551,7 +555,7 @@ return [ ], [ 'name' => '_APP_STORAGE_DO_SPACES_BUCKET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'DigitalOcean spaces bucket. Required when storage adapter is set to DOSpaces. You can create spaces in your DigitalOcean console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -559,7 +563,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_ACCESS_KEY', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Backblaze access key. Required when the storage adapter is set to Backblaze. Your Backblaze keyID will be your access key. You can get your keyID from your Backblaze console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -567,7 +571,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_SECRET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Backblaze secret key. Required when the storage adapter is set to Backblaze. Your Backblaze applicationKey will be your secret key. You can get your applicationKey from your Backblaze console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -575,7 +579,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_REGION', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Backblaze region. Required when storage adapter is set to Backblaze. You can find your region info from your Backblaze console.', 'introduction' => '0.14.2', 'default' => 'us-west-004', 'required' => false, @@ -583,7 +587,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_BUCKET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Backblaze bucket. Required when storage adapter is set to Backblaze. You can create your bucket from your Backblaze console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -591,7 +595,7 @@ return [ ], [ 'name' => '_APP_STORAGE_LINODE_ACCESS_KEY', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Linode object storage access key. Required when the storage adapter is set to Linode. You can get your access key from your Linode console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -599,7 +603,7 @@ return [ ], [ 'name' => '_APP_STORAGE_LINODE_SECRET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Linode object storage secret key. Required when the storage adapter is set to Linode. You can get your secret key from your Linode console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -607,7 +611,7 @@ return [ ], [ 'name' => '_APP_STORAGE_LINODE_REGION', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Linode object storage region. Required when storage adapter is set to Linode. You can find your region info from your Linode console.', 'introduction' => '0.14.2', 'default' => 'eu-central-1', 'required' => false, @@ -615,7 +619,7 @@ return [ ], [ 'name' => '_APP_STORAGE_LINODE_BUCKET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Linode object storage bucket. Required when storage adapter is set to Linode. You can create buckets in your Linode console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -623,7 +627,7 @@ return [ ], [ 'name' => '_APP_STORAGE_WASABI_ACCESS_KEY', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Wasabi access key. Required when the storage adapter is set to Wasabi. You can get your access key from your Wasabi console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -631,7 +635,7 @@ return [ ], [ 'name' => '_APP_STORAGE_WASABI_SECRET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Wasabi secret key. Required when the storage adapter is set to Wasabi. You can get your secret key from your Wasabi console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -639,7 +643,7 @@ return [ ], [ 'name' => '_APP_STORAGE_WASABI_REGION', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Wasabi region. Required when storage adapter is set to Wasabi. You can find your region info from your Wasabi console.', 'introduction' => '0.14.2', 'default' => 'eu-central-1', 'required' => false, @@ -647,7 +651,7 @@ return [ ], [ 'name' => '_APP_STORAGE_WASABI_BUCKET', - 'description' => 'Deprecated since 1.2.0. Use _APP_CONNECTIONS_STORAGE instead.', + 'description' => 'Wasabi bucket. Required when storage adapter is set to Wasabi. You can create buckets in your Wasabi console.', 'introduction' => '0.14.2', 'default' => '', 'required' => false, @@ -814,7 +818,7 @@ return [ ], [ 'name' => '_APP_FUNCTIONS_RUNTIMES_NETWORK', - 'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.', + 'description' => 'The docker network used for communication between the executor and runtimes.', 'introduction' => '1.2.0', 'default' => 'runtimes', 'required' => false, @@ -850,6 +854,66 @@ return [ ], ], ], + [ + 'category' => 'VCS (Version Control System)', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_VCS_GITHUB_APP_NAME', + 'description' => 'Name of your GitHub app. This value should be set to your GitHub application\'s URL.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_VCS_GITHUB_PRIVATE_KEY', + 'description' => 'GitHub app RSA private key. You can generate private keys from GitHub application settings.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_VCS_GITHUB_APP_ID', + 'description' => 'GitHub application ID. You can find it in your GitHub application details.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_VCS_GITHUB_CLIENT_ID', + 'description' => 'GitHub client ID. You can find it in your GitHub application details.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_VCS_GITHUB_CLIENT_SECRET', + 'description' => 'GitHub client secret. You can generate secrets in your GitHub application settings.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_VCS_GITHUB_WEBHOOK_SECRET', + 'description' => 'GitHub webhook secret. You can configure it in your GitHub application settings under webhook section.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + ], + ], [ 'category' => 'Maintenance', 'description' => '', @@ -952,4 +1016,43 @@ return [ ], ], ], + [ + 'category' => 'Migrations', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_MIGRATIONS_FIREBASE_CLIENT_ID', + 'description' => 'Google OAuth client ID. You can find it in your GCP application settings.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', + 'description' => 'Google OAuth client secret. You can generate secrets in your GCP application settings.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ] + ] + ], + [ + 'category' => 'Assistant', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_ASSISTANT_OPENAI_API_KEY', + 'description' => 'OpenAI API key. You can find it in your OpenAI application settings.', + 'introduction' => '1.4.0', + 'default' => '', + 'required' => false, + 'question' => '', + 'filter' => '' + ] + ] + ] ]; diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 9fc4c46931..c6df38c3ca 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -17,6 +17,7 @@ use Appwrite\OpenSSL\OpenSSL; use Appwrite\Template\Template; use Appwrite\URL\URL as URLParser; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Queries\Identities; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; @@ -48,101 +49,6 @@ use Appwrite\Auth\Validator\PersonalData; $oauthDefaultSuccess = '/auth/oauth2/success'; $oauthDefaultFailure = '/auth/oauth2/failure'; -App::post('/v1/account/invite') - ->desc('Create account using an invite code') - ->groups(['api', 'account', 'auth']) - ->label('event', 'users.[userId].create') - ->label('scope', 'public') - ->label('auth.type', 'emailPassword') - ->label('audits.event', 'user.create') - ->label('audits.resource', 'user/{response.$id}') - ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createWithInviteCode') - ->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_ACCOUNT) - ->label('abuse-limit', 10) - ->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique 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. Must be at least 8 chars.') - ->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true) - ->param('code', '', new Text(128), 'An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.', true) - ->inject('request') - ->inject('response') - ->inject('project') - ->inject('dbForProject') - ->inject('events') - ->action(function (string $userId, string $email, string $password, string $name, string $code, Request $request, Response $response, Document $project, Database $dbForProject, Event $events) { - - if ($project->getId() !== 'console') { - throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN); - } - - $email = \strtolower($email); - - $whitelistCodes = (!empty(App::getEnv('_APP_CONSOLE_WHITELIST_CODES', null))) ? \explode(',', App::getEnv('_APP_CONSOLE_WHITELIST_CODES', null)) : []; - - if (empty($whitelistCodes)) { - throw new Exception(Exception::GENERAL_CODES_DISABLED); - } - - if (!empty($whitelistCodes) && !\in_array($code, $whitelistCodes)) { - throw new Exception(Exception::USER_INVALID_CODE); - } - - $limit = $project->getAttribute('auths', [])['limit'] ?? 0; - - if ($limit !== 0) { - $total = $dbForProject->count('users', max: APP_LIMIT_USERS); - - if ($total >= $limit) { - throw new Exception(Exception::USER_COUNT_EXCEEDED); - } - } - - try { - $userId = $userId == 'unique()' ? ID::unique() : $userId; - $user = Authorization::skip(fn() => $dbForProject->createDocument('users', new Document([ - '$id' => $userId, - '$permissions' => [ - Permission::read(Role::any()), - Permission::update(Role::user($userId)), - Permission::delete(Role::user($userId)), - ], - 'email' => $email, - 'emailVerification' => false, - 'status' => true, - 'password' => Auth::passwordHash($password, Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS), - 'hash' => Auth::DEFAULT_ALGO, - 'hashOptions' => Auth::DEFAULT_ALGO_OPTIONS, - 'passwordUpdate' => DateTime::now(), - 'registration' => DateTime::now(), - 'reset' => false, - 'name' => $name, - 'prefs' => new \stdClass(), - 'sessions' => null, - 'tokens' => null, - 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]) - ]))); - } catch (Duplicate $th) { - throw new Exception(Exception::USER_ALREADY_EXISTS); - } - - Authorization::unsetRole(Role::guests()->toString()); - Authorization::setRole(Role::user($user->getId())->toString()); - Authorization::setRole(Role::users()->toString()); - - $events->setParam('userId', $user->getId()); - - $response - ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($user, Response::MODEL_ACCOUNT); - }); - App::post('/v1/account') ->desc('Create Account') ->groups(['api', 'account', 'auth']) @@ -152,6 +58,7 @@ App::post('/v1/account') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'create') @@ -195,6 +102,14 @@ App::post('/v1/account') } } + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + if ($project->getAttribute('auths', [])['personalDataCheck'] ?? false) { $personalDataValidator = new PersonalData($userId, $email, $name, null); if (!$personalDataValidator->isValid($password)) { @@ -229,10 +144,10 @@ App::post('/v1/account') 'tokens' => null, 'memberships' => null, 'search' => implode(' ', [$userId, $email, $name]), - 'accessedAt' => DateTime::now(), // Add this here to make sure it's returned in the response + 'accessedAt' => DateTime::now(), ]); Authorization::skip(fn() => $dbForProject->createDocument('users', $user)); - } catch (Duplicate $th) { + } catch (Duplicate) { throw new Exception(Exception::USER_ALREADY_EXISTS); } @@ -257,6 +172,8 @@ App::post('/v1/account/sessions/email') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') + ->label('usage.metric', 'sessions.{scope}.requests.create') + ->label('usage.params', ['provider:email']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createEmailSession') @@ -381,8 +298,8 @@ App::get('/v1/account/sessions/oauth2/:provider') ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->param('provider', '', new WhiteList(\array_keys(Config::getParam('providers')), true), 'OAuth2 Provider. Currently, supported providers are: ' . \implode(', ', \array_keys(\array_filter(Config::getParam('providers'), fn($node) => (!$node['mock'])))) . '.') - ->param('success', '', fn($clients) => new Host($clients), 'URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', true, ['clients']) - ->param('failure', '', fn($clients) => new Host($clients), 'URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', true, ['clients']) + ->param('success', '', fn($clients) => new Host($clients), '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.', true, ['clients']) + ->param('failure', '', fn($clients) => new Host($clients), '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.', true, ['clients']) ->param('scopes', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' scopes are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->inject('request') ->inject('response') @@ -440,7 +357,7 @@ App::get('/v1/account/sessions/oauth2/callback/:provider/:projectId') ->label('docs', false) ->param('projectId', '', new Text(1024), 'Project ID.') ->param('provider', '', new WhiteList(\array_keys(Config::getParam('providers')), true), 'OAuth2 provider.') - ->param('code', '', new Text(2048, 0), 'OAuth2 code.', true) + ->param('code', '', new Text(2048, 0), 'OAuth2 code. This is a temporary code that the will be later exchanged for an access token.', true) ->param('state', '', new Text(2048), 'Login state params.', true) ->param('error', '', new Text(2048, 0), 'Error code returned from the OAuth2 provider.', true) ->param('error_description', '', new Text(2048, 0), 'Human-readable text providing additional information about the error returned from the OAuth2 provider.', true) @@ -473,7 +390,7 @@ App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId') ->label('docs', false) ->param('projectId', '', new Text(1024), 'Project ID.') ->param('provider', '', new WhiteList(\array_keys(Config::getParam('providers')), true), 'OAuth2 provider.') - ->param('code', '', new Text(2048, 0), 'OAuth2 code.', true) + ->param('code', '', new Text(2048, 0), 'OAuth2 code. This is a temporary code that the will be later exchanged for an access token.', true) ->param('state', '', new Text(2048), 'Login state params.', true) ->param('error', '', new Text(2048, 0), 'Error code returned from the OAuth2 provider.', true) ->param('error_description', '', new Text(2048, 0), 'Human-readable text providing additional information about the error returned from the OAuth2 provider.', true) @@ -509,8 +426,10 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->label('docs', false) + ->label('usage.metric', 'sessions.{scope}.requests.create') + ->label('usage.params', ['provider:{request.provider}']) ->param('provider', '', new WhiteList(\array_keys(Config::getParam('providers')), true), 'OAuth2 provider.') - ->param('code', '', new Text(2048, 0), 'OAuth2 code.', true) + ->param('code', '', new Text(2048, 0), 'OAuth2 code. This is a temporary code that the will be later exchanged for an access token.', true) ->param('state', '', new Text(2048), 'OAuth2 state params.', true) ->param('error', '', new Text(2048, 0), 'Error code returned from the OAuth2 provider.', true) ->param('error_description', '', new Text(2048, 0), 'Human-readable text providing additional information about the error returned from the OAuth2 provider.', true) @@ -622,6 +541,22 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $failureRedirect(Exception::USER_MISSING_ID); } + $name = $oauth2->getUserName($accessToken); + $email = $oauth2->getUserEmail($accessToken); + + // Check if this identity is connected to a different user + if (!$user->isEmpty()) { + $userId = $user->getId(); + + $identitiesWithMatchingEmail = $dbForProject->find('identities', [ + Query::equal('providerEmail', [$email]), + Query::notEqual('userId', $userId), + ]); + if (!empty($identitiesWithMatchingEmail)) { + throw new Exception(Exception::USER_ALREADY_EXISTS); + } + } + $sessions = $user->getAttribute('sessions', []); $authDuration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG; $current = Auth::sessionVerify($sessions, Auth::$secret, $authDuration); @@ -645,9 +580,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') } if ($user === false || $user->isEmpty()) { // No user logged in or with OAuth2 provider ID, create new one or connect with account with same email - $name = $oauth2->getUserName($accessToken); - $email = $oauth2->getUserEmail($accessToken); - if (empty($email)) { throw new Exception(Exception::USER_UNAUTHORIZED, 'OAuth provider failed to return email.'); } @@ -664,7 +596,19 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $user->setAttributes($userWithEmail->getArrayCopy()); } - if ($user === false || $user->isEmpty()) { // Last option -> create the user, generate random password + // If user is not found, check if there is an identity with the same provider user ID + if ($user === false || $user->isEmpty()) { + $identity = $dbForProject->findOne('identities', [ + Query::equal('provider', [$provider]), + Query::equal('providerUid', [$oauth2ID]), + ]); + + if ($identity !== false && !$identity->isEmpty()) { + $user = $dbForProject->getDocument('users', $identity->getAttribute('userId')); + } + } + + if ($user === false || $user->isEmpty()) { // Last option -> create the user $limit = $project->getAttribute('auths', [])['limit'] ?? 0; if ($limit !== 0) { @@ -675,11 +619,16 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') } } - $passwordHistory = $project->getAttribute('auths', [])['passwordHistory'] ?? 0; + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } try { $userId = ID::unique(); - $password = Auth::passwordHash(Auth::passwordGenerator(), Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS); $user->setAttributes([ '$id' => $userId, '$permissions' => [ @@ -690,8 +639,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') 'email' => $email, 'emailVerification' => true, 'status' => true, // Email should already be authenticated by OAuth2 provider - 'passwordHistory' => $passwordHistory > 0 ? [$password] : null, - 'password' => $password, + 'password' => null, 'hash' => Auth::DEFAULT_ALGO, 'hashOptions' => Auth::DEFAULT_ALGO_OPTIONS, 'passwordUpdate' => null, @@ -702,19 +650,64 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]) + 'search' => implode(' ', [$userId, $email, $name]), + 'accessedAt' => DateTime::now(), ]); Authorization::skip(fn() => $dbForProject->createDocument('users', $user)); - } catch (Duplicate $th) { + } catch (Duplicate) { $failureRedirect(Exception::USER_ALREADY_EXISTS); } } } + Authorization::setRole(Role::user($user->getId())->toString()); + Authorization::setRole(Role::users()->toString()); + if (false === $user->getAttribute('status')) { // Account is blocked $failureRedirect(Exception::USER_BLOCKED); // User is in status blocked } + $identity = $dbForProject->findOne('identities', [ + Query::equal('userInternalId', [$user->getInternalId()]), + Query::equal('provider', [$provider]), + Query::equal('providerUid', [$oauth2ID]), + ]); + if ($identity === false || $identity->isEmpty()) { + // Before creating the identity, check if the email is already associated with another user + $userId = $user->getId(); + + $identitiesWithMatchingEmail = $dbForProject->find('identities', [ + Query::equal('providerEmail', [$email]), + Query::notEqual('userId', $user->getId()), + ]); + if (!empty($identitiesWithMatchingEmail)) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + + $dbForProject->createDocument('identities', new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ], + 'userInternalId' => $user->getInternalId(), + 'userId' => $userId, + 'provider' => $provider, + 'providerUid' => $oauth2ID, + 'providerEmail' => $email, + 'providerAccessToken' => $accessToken, + 'providerRefreshToken' => $refreshToken, + 'providerAccessTokenExpiry' => DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry), + ])); + } else { + $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry)); + $dbForProject->updateDocument('identities', $identity->getId(), $identity); + } + // Create session token, verify user account and update OAuth2 ID and Access Token $duration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG; $detector = new Detector($request->getUserAgent('UNKNOWN')); @@ -794,6 +787,88 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') ; }); +App::get('/v1/account/identities') + ->desc('List Identities') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('usage.metric', 'users.{scope}.requests.read') + ->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') + ->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') + ->inject('dbForProject') + ->action(function (array $queries, Response $response, Document $user, Database $dbForProject) { + + $queries = Query::parseQueries($queries); + + $queries[] = Query::equal('userInternalId', [$user->getInternalId()]); + + // Get cursor document if there was a cursor query + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); + $cursor = reset($cursor); + if ($cursor) { + /** @var Query $cursor */ + $identityId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('identities', $identityId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Identity '{$identityId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + $results = $dbForProject->find('identities', $queries); + $total = $dbForProject->count('identities', $filterQueries, APP_LIMIT_COUNT); + + $response->dynamic(new Document([ + 'identities' => $results, + 'total' => $total, + ]), Response::MODEL_IDENTITY_LIST); + }); + +App::delete('/v1/account/identities/:identityId') + ->desc('Delete Identity') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('event', 'users.[userId].identities.[identityId].delete') + ->label('audits.event', 'identity.delete') + ->label('audits.resource', 'identity/{request.$identityId}') + ->label('audits.userId', '{user.$id}') + ->label('usage.metric', 'identities.{scope}.requests.delete') + ->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) + ->param('identityId', '', new UID(), 'Identity ID.') + ->inject('response') + ->inject('dbForProject') + ->action(function (string $identityId, Response $response, Database $dbForProject) { + + $identity = $dbForProject->getDocument('identities', $identityId); + + if ($identity->isEmpty()) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $dbForProject->deleteDocument('identities', $identityId); + + return $response->noContent(); + }); + App::post('/v1/account/sessions/magic-url') ->desc('Create Magic URL session') ->groups(['api', 'account']) @@ -846,6 +921,14 @@ App::post('/v1/account/sessions/magic-url') } } + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + $userId = $userId === 'unique()' ? ID::unique() : $userId; $user->setAttributes([ @@ -868,7 +951,8 @@ App::post('/v1/account/sessions/magic-url') 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email]) + 'search' => implode(' ', [$userId, $email]), + 'accessedAt' => DateTime::now(), ]); Authorization::skip(fn () => $dbForProject->createDocument('users', $user)); @@ -907,42 +991,84 @@ App::post('/v1/account/sessions/magic-url') $url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $user->getId(), 'secret' => $loginSecret, 'expire' => $expire, 'project' => $project->getId()]); $url = Template::unParseURL($url); - $from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $project->getAttribute('name')); - $body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl'); + $body = $locale->getText("emails.magicSession.body"); $subject = $locale->getText("emails.magicSession.subject"); - - $smtpEnabled = $project->getAttribute('smtp', [])['enabled'] ?? false; $customTemplate = $project->getAttribute('templates', [])['email.magicSession-' . $locale->default] ?? []; - if ($smtpEnabled && !empty($customTemplate)) { - $body = $customTemplate['message'] ?? $body; - $subject = $customTemplate['subject'] ?? $subject; - $from = $customTemplate['senderName'] ?? $from; + + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message->setParam('{{body}}', $body); + $body = $message->render(); + + $smtp = $project->getAttribute('smtp', []); + $smtpEnabled = $smtp['enabled'] ?? false; + + $senderEmail = App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $senderName = App::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']; + } + + $mails + ->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; + } + + $mails + ->setSmtpReplyTo($replyTo) + ->setSmtpSenderEmail($senderEmail) + ->setSmtpSenderName($senderName); } - $body - ->setParam('{{subject}}', $subject) - ->setParam('{{hello}}', $locale->getText("emails.magicSession.hello")) - ->setParam('{{name}}', '') - ->setParam('{{body}}', $locale->getText("emails.magicSession.body")) - ->setParam('{{redirect}}', $url) - ->setParam('{{footer}}', $locale->getText("emails.magicSession.footer")) - ->setParam('{{thanks}}', $locale->getText("emails.magicSession.thanks")) - ->setParam('{{signature}}', $locale->getText("emails.magicSession.signature")) - ->setParam('{{project}}', $project->getAttribute('name')) - ->setParam('{{direction}}', $locale->getText('settings.direction')) - ->setParam('{{bg-body}}', '#f7f7f7') - ->setParam('{{bg-content}}', '#ffffff') - ->setParam('{{text-content}}', '#000000'); - - $body = $body->render(); + $emailVariables = [ + 'subject' => $subject, + 'hello' => $locale->getText("emails.magicSession.hello"), + 'body' => $body, + 'footer' => $locale->getText("emails.magicSession.footer"), + 'thanks' => $locale->getText("emails.magicSession.thanks"), + 'signature' => $locale->getText("emails.magicSession.signature"), + 'direction' => $locale->getText('settings.direction'), + 'bg-body' => '#f7f7f7', + 'bg-content' => '#ffffff', + 'text-content' => '#000000', + /* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */ + 'user' => '', + 'team' => '', + 'project' => $project->getAttribute('name'), + 'redirect' => $url + ]; $mails ->setSubject($subject) ->setBody($body) - ->setFrom($from) - ->setRecipient($user->getAttribute('email')) - ->trigger() - ; + ->setVariables($emailVariables) + ->setRecipient($email) + ->trigger(); $events->setPayload( $response->output( @@ -968,6 +1094,8 @@ App::put('/v1/account/sessions/magic-url') ->label('audits.event', 'session.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') + ->label('usage.metric', 'sessions.{scope}.requests.create') + ->label('usage.params', ['provider:magic-url']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateMagicURLSession') @@ -1057,8 +1185,7 @@ App::put('/v1/account/sessions/magic-url') $events ->setParam('userId', $user->getId()) - ->setParam('sessionId', $session->getId()) - ; + ->setParam('sessionId', $session->getId()); if (!Config::getParam('domainVerification')) { $response->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])); @@ -1069,16 +1196,14 @@ App::put('/v1/account/sessions/magic-url') $response ->addCookie(Auth::$cookieName . '_legacy', Auth::encodeSession($user->getId(), $secret), (new \DateTime($expire))->getTimestamp(), '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, null) ->addCookie(Auth::$cookieName, Auth::encodeSession($user->getId(), $secret), (new \DateTime($expire))->getTimestamp(), '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite')) - ->setStatusCode(Response::STATUS_CODE_CREATED) - ; + ->setStatusCode(Response::STATUS_CODE_CREATED); $countryName = $locale->getText('countries.' . strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')); $session ->setAttribute('current', true) ->setAttribute('countryName', $countryName) - ->setAttribute('expire', $expire) - ; + ->setAttribute('expire', $expire); $response->dynamic($session, Response::MODEL_SESSION); }); @@ -1155,7 +1280,8 @@ App::post('/v1/account/sessions/phone') 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $phone]) + 'search' => implode(' ', [$userId, $phone]), + 'accessedAt' => DateTime::now(), ]); Authorization::skip(fn () => $dbForProject->createDocument('users', $user)); @@ -1342,6 +1468,8 @@ App::post('/v1/account/sessions/anonymous') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') + ->label('usage.metric', 'sessions.{scope}.requests.create') + ->label('usage.params', ['provider:anonymous']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createAnonymousSession') @@ -1404,6 +1532,7 @@ App::post('/v1/account/sessions/anonymous') 'tokens' => null, 'memberships' => null, 'search' => $userId, + 'accessedAt' => DateTime::now(), ]); Authorization::skip(fn() => $dbForProject->createDocument('users', $user)); @@ -1517,6 +1646,7 @@ App::get('/v1/account') ->desc('Get Account') ->groups(['api', 'account']) ->label('scope', 'account') + ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'get') @@ -1537,6 +1667,7 @@ App::get('/v1/account/prefs') ->desc('Get Account Preferences') ->groups(['api', 'account']) ->label('scope', 'account') + ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'getPrefs') @@ -1559,6 +1690,7 @@ App::get('/v1/account/sessions') ->desc('List Sessions') ->groups(['api', 'account']) ->label('scope', 'account') + ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'listSessions') @@ -1597,6 +1729,7 @@ App::get('/v1/account/logs') ->desc('List Logs') ->groups(['api', 'account']) ->label('scope', 'account') + ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'listLogs') @@ -1657,6 +1790,7 @@ App::get('/v1/account/sessions/:sessionId') ->desc('Get Session') ->groups(['api', 'account']) ->label('scope', 'account') + ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'getSession') @@ -1704,6 +1838,7 @@ App::patch('/v1/account/name') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateName') @@ -1738,6 +1873,7 @@ App::patch('/v1/account/password') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePassword') @@ -1803,6 +1939,7 @@ App::patch('/v1/account/email') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateEmail') @@ -1832,6 +1969,15 @@ App::patch('/v1/account/email') $email = \strtolower($email); + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + Query::notEqual('userId', $user->getId()), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + $user ->setAttribute('email', $email) ->setAttribute('emailVerification', false) // After this user needs to confirm mail again @@ -1863,6 +2009,7 @@ App::patch('/v1/account/phone') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePhone') @@ -1921,6 +2068,7 @@ App::patch('/v1/account/prefs') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePrefs') @@ -1954,6 +2102,7 @@ App::patch('/v1/account/status') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateStatus') @@ -1997,6 +2146,7 @@ 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('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'deleteSession') @@ -2073,6 +2223,7 @@ App::patch('/v1/account/sessions/:sessionId') ->label('audits.event', 'session.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') + ->label('usage.metric', 'sessions.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateSession') @@ -2157,6 +2308,7 @@ App::delete('/v1/account/sessions') ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') + ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'deleteSessions') @@ -2218,6 +2370,7 @@ App::post('/v1/account/recovery') ->label('audits.event', 'recovery.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createRecovery') @@ -2293,44 +2446,86 @@ App::post('/v1/account/recovery') $url = Template::unParseURL($url); $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); - $from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName); - $body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl'); + $body = $locale->getText("emails.recovery.body"); $subject = $locale->getText("emails.recovery.subject"); - - $smtpEnabled = $project->getAttribute('smtp', [])['enabled'] ?? false; $customTemplate = $project->getAttribute('templates', [])['email.recovery-' . $locale->default] ?? []; - if ($smtpEnabled && !empty($customTemplate)) { - $body = $customTemplate['message'] ?? $body; - $subject = $customTemplate['subject'] ?? $subject; - $from = $customTemplate['senderName'] ?? $from; + + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message->setParam('{{body}}', $body); + $body = $message->render(); + + $smtp = $project->getAttribute('smtp', []); + $smtpEnabled = $smtp['enabled'] ?? false; + + $senderEmail = App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $senderName = App::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']; + } + + $mails + ->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; + } + + $mails + ->setSmtpReplyTo($replyTo) + ->setSmtpSenderEmail($senderEmail) + ->setSmtpSenderName($senderName); } - $body - ->setParam('{{subject}}', $subject) - ->setParam('{{hello}}', $locale->getText("emails.recovery.hello")) - ->setParam('{{name}}', $profile->getAttribute('name')) - ->setParam('{{body}}', $locale->getText("emails.recovery.body")) - ->setParam('{{redirect}}', $url) - ->setParam('{{footer}}', $locale->getText("emails.recovery.footer")) - ->setParam('{{thanks}}', $locale->getText("emails.recovery.thanks")) - ->setParam('{{signature}}', $locale->getText("emails.recovery.signature")) - ->setParam('{{project}}', $projectName) - ->setParam('{{direction}}', $locale->getText('settings.direction')) - ->setParam('{{bg-body}}', '#f7f7f7') - ->setParam('{{bg-content}}', '#ffffff') - ->setParam('{{text-content}}', '#000000'); - - $body = $body->render(); + $emailVariables = [ + 'subject' => $subject, + 'hello' => $locale->getText("emails.recovery.hello"), + 'body' => $body, + 'footer' => $locale->getText("emails.recovery.footer"), + 'thanks' => $locale->getText("emails.recovery.thanks"), + 'signature' => $locale->getText("emails.recovery.signature"), + 'direction' => $locale->getText('settings.direction'), + 'bg-body' => '#f7f7f7', + 'bg-content' => '#ffffff', + 'text-content' => '#000000', + /* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */ + 'user' => $profile->getAttribute('name'), + 'team' => '', + 'project' => $projectName, + 'redirect' => $url + ]; $mails ->setRecipient($profile->getAttribute('email', '')) ->setName($profile->getAttribute('name')) ->setBody($body) - ->setFrom($from) + ->setVariables($emailVariables) ->setSubject($subject) ->trigger(); - ; $events ->setParam('userId', $profile->getId()) @@ -2358,6 +2553,7 @@ App::put('/v1/account/recovery') ->label('audits.event', 'recovery.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateRecovery') @@ -2444,6 +2640,7 @@ App::post('/v1/account/verification') ->label('event', 'users.[userId].verification.[tokenId].create') ->label('audits.event', 'verification.create') ->label('audits.resource', 'user/{response.userId}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createVerification') @@ -2501,43 +2698,85 @@ App::post('/v1/account/verification') $url = Template::unParseURL($url); $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); - $from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName); - $body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl'); + $body = $locale->getText("emails.verification.body"); $subject = $locale->getText("emails.verification.subject"); - - $smtpEnabled = $project->getAttribute('smtp', [])['enabled'] ?? false; $customTemplate = $project->getAttribute('templates', [])['email.verification-' . $locale->default] ?? []; - if ($smtpEnabled && !empty($customTemplate)) { - $body = $customTemplate['message'] ?? $body; - $subject = $customTemplate['subject'] ?? $subject; - $from = $customTemplate['senderName'] ?? $from; + + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message->setParam('{{body}}', $body); + $body = $message->render(); + + $smtp = $project->getAttribute('smtp', []); + $smtpEnabled = $smtp['enabled'] ?? false; + + $senderEmail = App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $senderName = App::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']; + } + + $mails + ->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; + } + + $mails + ->setSmtpReplyTo($replyTo) + ->setSmtpSenderEmail($senderEmail) + ->setSmtpSenderName($senderName); } - $body - ->setParam('{{subject}}', $subject) - ->setParam('{{hello}}', $locale->getText("emails.verification.hello")) - ->setParam('{{name}}', $user->getAttribute('name')) - ->setParam('{{body}}', $locale->getText("emails.verification.body")) - ->setParam('{{redirect}}', $url) - ->setParam('{{footer}}', $locale->getText("emails.verification.footer")) - ->setParam('{{thanks}}', $locale->getText("emails.verification.thanks")) - ->setParam('{{signature}}', $locale->getText("emails.verification.signature")) - ->setParam('{{project}}', $projectName) - ->setParam('{{direction}}', $locale->getText('settings.direction')) - ->setParam('{{bg-body}}', '#f7f7f7') - ->setParam('{{bg-content}}', '#ffffff') - ->setParam('{{text-content}}', '#000000'); - - $body = $body->render(); + $emailVariables = [ + 'subject' => $subject, + 'hello' => $locale->getText("emails.verification.hello"), + 'body' => $body, + 'footer' => $locale->getText("emails.verification.footer"), + 'thanks' => $locale->getText("emails.verification.thanks"), + 'signature' => $locale->getText("emails.verification.signature"), + 'direction' => $locale->getText('settings.direction'), + 'bg-body' => '#f7f7f7', + 'bg-content' => '#ffffff', + 'text-content' => '#000000', + /* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */ + 'user' => $user->getAttribute('name'), + 'team' => '', + 'project' => $projectName, + 'redirect' => $url + ]; $mails ->setSubject($subject) ->setBody($body) - ->setFrom($from) + ->setVariables($emailVariables) ->setRecipient($user->getAttribute('email')) ->setName($user->getAttribute('name') ?? '') - ->trigger() - ; + ->trigger(); $events ->setParam('userId', $user->getId()) @@ -2545,8 +2784,7 @@ App::post('/v1/account/verification') ->setPayload($response->output( $verification->setAttribute('secret', $verificationSecret), Response::MODEL_TOKEN - )) - ; + )); // Hide secret for clients $verification->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $verificationSecret : ''); @@ -2563,6 +2801,7 @@ App::put('/v1/account/verification') ->label('event', 'users.[userId].verification.[tokenId].update') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.userId}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateVerification') @@ -2623,6 +2862,7 @@ 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('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createPhoneVerification') @@ -2718,6 +2958,7 @@ 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('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePhoneVerification') diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 0be2e0d849..3b93348643 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -1,11 +1,8 @@ isKnown()) { + throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED); + } + + $fetch = @\file_get_contents($url); if (!$fetch) { throw new Exception(Exception::AVATAR_IMAGE_NOT_FOUND); @@ -326,6 +333,12 @@ App::get('/v1/avatars/favicon') throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Imagick extension is missing'); } + $domain = new Domain(\parse_url($url, PHP_URL_HOST)); + + if (!$domain->isKnown()) { + throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED); + } + $curl = \curl_init(); \curl_setopt_array($curl, [ @@ -399,6 +412,12 @@ App::get('/v1/avatars/favicon') $outputExt = 'ico'; } + $domain = new Domain(\parse_url($outputHref, PHP_URL_HOST)); + + if (!$domain->isKnown()) { + throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED); + } + if ('ico' == $outputExt) { // Skip crop, Imagick isn\'t supporting icon files $data = @\file_get_contents($outputHref, false); @@ -545,8 +564,6 @@ App::get('/v1/avatars/initials') $image->setImageFormat("png"); $image->compositeImage($punch, Imagick::COMPOSITE_COPYOPACITY, 0, 0); - //$image->setImageCompressionQuality(9 - round(($quality / 100) * 9)); - $response ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)) . ' GMT') // 45 days cache ->setContentType('image/png') diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index f2ea83af58..1bd62a1d4c 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -29,23 +29,37 @@ App::get('/v1/console/variables') ->label('sdk.response.model', Response::MODEL_CONSOLE_VARIABLES) ->inject('response') ->action(function (Response $response) { + $isDomainEnabled = !empty(App::getEnv('_APP_DOMAIN', '')) + && !empty(App::getEnv('_APP_DOMAIN_TARGET', '')) + && App::getEnv('_APP_DOMAIN', '') !== 'localhost' + && App::getEnv('_APP_DOMAIN_TARGET', '') !== 'localhost'; + + $isVcsEnabled = !empty(App::getEnv('_APP_VCS_GITHUB_APP_NAME', '')) + && !empty(App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY', '')) + && !empty(App::getEnv('_APP_VCS_GITHUB_APP_ID', '')) + && !empty(App::getEnv('_APP_VCS_GITHUB_CLIENT_ID', '')) + && !empty(App::getEnv('_APP_VCS_GITHUB_CLIENT_SECRET', '')); + + $isAssistantEnabled = !empty(App::getEnv('_APP_ASSISTANT_OPENAI_API_KEY', '')); $variables = new Document([ '_APP_DOMAIN_TARGET' => App::getEnv('_APP_DOMAIN_TARGET'), '_APP_STORAGE_LIMIT' => +App::getEnv('_APP_STORAGE_LIMIT'), '_APP_FUNCTIONS_SIZE_LIMIT' => +App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT'), '_APP_USAGE_STATS' => App::getEnv('_APP_USAGE_STATS'), + '_APP_VCS_ENABLED' => $isVcsEnabled, + '_APP_DOMAIN_ENABLED' => $isDomainEnabled, + '_APP_ASSISTANT_ENABLED' => $isAssistantEnabled ]); $response->dynamic($variables, Response::MODEL_CONSOLE_VARIABLES); }); - App::post('/v1/console/assistant') ->desc('Ask Query') ->groups(['api', 'assistant']) - ->label('scope', 'public') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION]) + ->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') @@ -53,12 +67,12 @@ App::post('/v1/console/assistant') ->label('sdk.response.type', Response::CONTENT_TYPE_TEXT) ->label('abuse-limit', 15) ->label('abuse-key', 'userId:{userId}') - ->param('query', '', new Text(2000), 'Query') + ->param('prompt', '', new Text(2000), 'Prompt. A string containing questions asked to the AI assistant.') ->inject('response') - ->action(function (string $query, Response $response) { + ->action(function (string $prompt, Response $response) { $ch = curl_init('http://appwrite-assistant:3003/'); $responseHeaders = []; - $query = json_encode(['prompt' => $query]); + $query = json_encode(['prompt' => $prompt]); $headers = ['accept: text/event-stream']; $handleEvent = function ($ch, $data) use ($response) { $response->chunk($data); diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 2a1884e6b2..bf66e9fd8e 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -26,6 +26,7 @@ use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Limit as LimitException; use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Exception\Structure as StructureException; +use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -196,16 +197,14 @@ function createAttribute(string $databaseId, string $collectionId, Document $att ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) ->setDatabase($db) ->setCollection($collection) - ->setDocument($attribute) - ; + ->setDocument($attribute); $events ->setContext('collection', $collection) ->setContext('database', $db) ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) - ->setParam('attributeId', $attribute->getId()) - ; + ->setParam('attributeId', $attribute->getId()); $response->setStatusCode(Response::STATUS_CODE_CREATED); @@ -358,7 +357,7 @@ function updateAttribute( ); } - $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute); + $attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute); $dbForProject->deleteCachedDocument('database_' . $db->getInternalId(), $collection->getId()); $events @@ -378,6 +377,7 @@ App::post('/v1/databases') ->label('scope', 'databases.write') ->label('audits.event', 'database.create') ->label('audits.resource', 'database/{response.$id}') + ->label('usage.metric', 'databases.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'create') @@ -387,7 +387,7 @@ App::post('/v1/databases') ->label('sdk.response.model', Response::MODEL_DATABASE) // Model for database needs to be created ->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 database enabled?', true) + ->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) ->inject('response') ->inject('dbForProject') ->inject('events') @@ -451,6 +451,7 @@ App::get('/v1/databases') ->desc('List Databases') ->groups(['api', 'database']) ->label('scope', 'databases.read') + ->label('usage.metric', 'databases.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'list') @@ -471,7 +472,9 @@ App::get('/v1/databases') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { $databaseId = $cursor->getValue(); @@ -496,6 +499,7 @@ App::get('/v1/databases/:databaseId') ->desc('Get Database') ->groups(['api', 'database']) ->label('scope', 'databases.read') + ->label('usage.metric', 'databases.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'get') @@ -610,6 +614,7 @@ App::put('/v1/databases/:databaseId') ->label('event', 'databases.[databaseId].update') ->label('audits.event', 'database.update') ->label('audits.resource', 'database/{response.$id}') + ->label('usage.metric', 'databases.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'update') @@ -619,7 +624,7 @@ App::put('/v1/databases/:databaseId') ->label('sdk.response.model', Response::MODEL_DATABASE) ->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?', true) + ->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) ->inject('response') ->inject('dbForProject') ->inject('events') @@ -654,6 +659,7 @@ App::delete('/v1/databases/:databaseId') ->label('event', 'databases.[databaseId].delete') ->label('audits.event', 'database.delete') ->label('audits.resource', 'database/{request.databaseId}') + ->label('usage.metric', 'databases.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'delete') @@ -682,25 +688,24 @@ App::delete('/v1/databases/:databaseId') $deletes ->setType(DELETE_TYPE_DOCUMENT) - ->setDocument($database) - ; + ->setDocument($database); $events ->setParam('databaseId', $database->getId()) - ->setPayload($response->output($database, Response::MODEL_DATABASE)) - ; + ->setPayload($response->output($database, Response::MODEL_DATABASE)); $response->noContent(); }); App::post('/v1/databases/:databaseId/collections') - ->alias('/v1/database/collections', ['databaseId' => 'default']) ->desc('Create Collection') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].create') ->label('scope', 'collections.write') ->label('audits.event', 'collection.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{response.$id}') + ->label('usage.metric', 'collections.{scope}.requests.create') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createCollection') @@ -713,7 +718,7 @@ App::post('/v1/databases/:databaseId/collections') ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true) ->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).', true) - ->param('enabled', true, new Boolean(), 'Is collection enabled?', true) + ->param('enabled', true, new Boolean(), '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.', true) ->inject('response') ->inject('dbForProject') ->inject('mode') @@ -722,7 +727,7 @@ App::post('/v1/databases/:databaseId/collections') $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } @@ -766,6 +771,8 @@ App::get('/v1/databases/:databaseId/collections') ->desc('List Collections') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listCollections') @@ -783,7 +790,7 @@ App::get('/v1/databases/:databaseId/collections') $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } @@ -794,7 +801,9 @@ App::get('/v1/databases/:databaseId/collections') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -821,6 +830,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') ->desc('Get Collection') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getCollection') @@ -837,7 +848,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } @@ -855,6 +866,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') ->desc('List Collection Logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listCollectionLogs') @@ -952,6 +965,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateCollection') @@ -964,7 +979,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') ->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](/docs/permissions).', true) ->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).', true) - ->param('enabled', true, new Boolean(), 'Is collection enabled?', true) + ->param('enabled', true, new Boolean(), '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.', true) ->inject('response') ->inject('dbForProject') ->inject('mode') @@ -973,7 +988,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } @@ -1020,6 +1035,8 @@ 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('usage.metric', 'collections.{scope}.requests.delete') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteCollection') @@ -1037,7 +1054,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId') $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } @@ -1074,6 +1091,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createStringAttribute') @@ -1088,11 +1107,12 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->param('required', null, new Boolean(), 'Is attribute required?') ->param('default', null, new Text(0, 0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('encrypt', false, new Boolean(), 'Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.', true) ->inject('response') ->inject('dbForProject') ->inject('database') ->inject('events') - ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, Response $response, Database $dbForProject, EventDatabase $database, Event $events) { // Ensure attribute default is within required size $validator = new Text($size, 0); @@ -1100,6 +1120,12 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); } + $filters = []; + + if ($encrypt) { + $filters[] = 'encrypt'; + } + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, @@ -1107,6 +1133,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string 'required' => $required, 'default' => $default, 'array' => $array, + 'filters' => $filters, ]), $response, $dbForProject, $database, $events); $response @@ -1122,6 +1149,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email' ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createEmailAttribute') @@ -1164,6 +1193,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createEnumAttribute') @@ -1222,6 +1253,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createIpAttribute') @@ -1264,6 +1297,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createUrlAttribute') @@ -1306,6 +1341,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createIntegerAttribute') @@ -1377,6 +1414,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createFloatAttribute') @@ -1451,6 +1490,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createBooleanAttribute') @@ -1492,6 +1533,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createDatetimeAttribute') @@ -1511,6 +1554,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->inject('events') ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, Event $events) { + $filters[] = 'datetime'; + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_DATETIME, @@ -1518,7 +1563,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti 'required' => $required, 'default' => $default, 'array' => $array, - 'filters' => ['datetime'] + 'filters' => $filters, ]), $response, $dbForProject, $database, $events); $response @@ -1534,6 +1579,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createRelationshipAttribute') @@ -1611,6 +1658,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') ->desc('List Attributes') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listAttributes') @@ -1639,11 +1688,18 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') $queries = Query::parseQueries($queries); - \array_push($queries, Query::equal('collectionId', [$collectionId]), Query::equal('databaseId', [$databaseId])); + \array_push( + $queries, + Query::equal('collectionId', [$collectionId]), + Query::equal('databaseId', [$databaseId]) + ); // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); - $cursor = reset($cursor); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); + + $cursor = \reset($cursor); if ($cursor) { $attributeId = $cursor->getValue(); @@ -1653,17 +1709,22 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') Query::equal('key', [$attributeId]), Query::limit(1), ])); + if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Attribute '{$attributeId}' for the 'cursor' value not found."); } + $cursor->setValue($cursorDocument[0]); } - $filterQueries = Query::groupByType($queries)['filters']; + $filters = Query::groupByType($queries)['filters']; + + $attributes = $dbForProject->find('attributes', $queries); + $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); $response->dynamic(new Document([ - 'total' => $dbForProject->count('attributes', $filterQueries, APP_LIMIT_COUNT), - 'attributes' => $dbForProject->find('attributes', $queries), + 'attributes' => $attributes, + 'total' => $total, ]), Response::MODEL_ATTRIBUTE_LIST); }); @@ -1672,6 +1733,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') ->desc('Get Attribute') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getAttribute') @@ -1749,6 +1812,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateStringAttribute') @@ -1764,6 +1829,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin ->inject('dbForProject') ->inject('events') ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $events) { + $attribute = updateAttribute( databaseId: $databaseId, collectionId: $collectionId, @@ -1787,6 +1853,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateEmailAttribute') @@ -1826,6 +1894,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateEnumAttribute') @@ -1867,6 +1937,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateIpAttribute') @@ -1906,6 +1978,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateUrlAttribute') @@ -1945,6 +2019,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateIntegerAttribute') @@ -1994,6 +2070,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateFloatAttribute') @@ -2043,6 +2121,8 @@ 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('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateBooleanAttribute') @@ -2081,6 +2161,8 @@ 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('usage.metric', 'documents.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateDatetimeAttribute') @@ -2119,6 +2201,8 @@ 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('usage.metric', 'documents.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateRelationshipAttribute') @@ -2173,6 +2257,8 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete') ->label('audits.event', 'attribute.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteAttribute') @@ -2282,6 +2368,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') ->label('scope', 'collections.write') ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createIndex') @@ -2437,6 +2525,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') ->desc('List Indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listIndexes') @@ -2467,7 +2557,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') \array_push($queries, Query::equal('collectionId', [$collectionId]), Query::equal('databaseId', [$databaseId])); // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { @@ -2498,6 +2590,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->desc('Get Index') ->groups(['api', 'database']) ->label('scope', 'collections.read') + ->label('usage.metric', 'collections.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getIndex') @@ -2540,6 +2634,8 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete') ->label('audits.event', 'index.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'collections.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteIndex') @@ -2603,7 +2699,9 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('audits.event', 'document.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('usage.metric', 'documents.{scope}.requests.create') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->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) @@ -2640,16 +2738,17 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); - if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } $allowedPermissions = [ @@ -2672,8 +2771,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } // Users can only manage their own roles, API keys and Admin users can manage any - $roles = Authorization::getRoles(); - if (!Auth::isAppUser($roles) && !Auth::isPrivilegedUser($roles)) { + if (!$isAPIKey && !$isPrivilegedUser) { foreach (Database::PERMISSIONS as $type) { foreach ($permissions as $permission) { $permission = Permission::parse($permission); @@ -2686,7 +2784,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') $permission->getDimension() ))->toString(); if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); } } } @@ -2839,6 +2937,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('List Documents') ->groups(['api', 'database']) ->label('scope', 'documents.read') + ->label('usage.metric', 'documents.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listDocuments') @@ -2854,40 +2954,30 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') ->inject('dbForProject') ->inject('mode') ->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject, string $mode) { - $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - if (!$collection->getAttribute('documentSecurity', false)) { - $validator = new Authorization(Database::PERMISSION_READ); - if (!$validator->isValid($collection->getRead())) { - $collection = new Document(); - } - } - } - - if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - // Validate queries - $queriesValidator = new Documents($collection->getAttribute('attributes'), $collection->getAttribute('indexes')); - $validQueries = $queriesValidator->isValid($queries); - if (!$validQueries) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $queriesValidator->getDescription()); - } - $queries = Query::parseQueries($queries); // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); - $cursor = reset($cursor); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); + + $cursor = \reset($cursor); + if ($cursor) { $documentId = $cursor->getValue(); @@ -2900,13 +2990,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') $cursor->setValue($cursorDocument); } - $filterQueries = Query::groupByType($queries)['filters']; + $filters = Query::groupByType($queries)['filters']; - $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $filterQueries, APP_LIMIT_COUNT); + try { + $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $filters, APP_LIMIT_COUNT); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $e->getMessage()); + } // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database): bool { + $processDocument = (function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database): bool { if ($document->isEmpty()) { return false; } @@ -2951,12 +3047,11 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') } return true; - }; + }); - // The linter is forcing this indentation - foreach ($documents as $document) { - $processDocument($collection, $document); - } + foreach ($documents as $document) { + $processDocument($collection, $document); + } $response->dynamic(new Document([ 'total' => $total, @@ -2969,6 +3064,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->desc('Get Document') ->groups(['api', 'database']) ->label('scope', 'documents.read') + ->label('usage.metric', 'documents.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getDocument') @@ -2986,31 +3083,30 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->inject('dbForProject') ->inject('mode') ->action(function (string $databaseId, string $collectionId, string $documentId, array $queries, Response $response, Database $dbForProject, string $mode) { - $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); - if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - } - - // Validate queries - $queriesValidator = new DocumentQueriesValidator($collection->getAttribute('attributes')); - $validQueries = $queriesValidator->isValid($queries); - if (!$validQueries) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $queriesValidator->getDescription()); + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } $queries = Query::parseQueries($queries); - $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + try { + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $e->getMessage()); + } if ($document->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); @@ -3063,6 +3159,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->desc('List Document Logs') ->groups(['api', 'database']) ->label('scope', 'documents.read') + ->label('usage.metric', 'documents.{scope}.requests.read') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listDocumentLogs') @@ -3165,6 +3263,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum ->label('scope', 'documents.write') ->label('audits.event', 'document.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') + ->label('usage.metric', 'documents.{scope}.requests.update') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->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) @@ -3197,16 +3297,17 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); - if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } // Read permission should not be required for update @@ -3226,7 +3327,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum // Users can only manage their own roles, API keys and Admin users can manage any $roles = Authorization::getRoles(); - if (!Auth::isAppUser($roles) && !Auth::isPrivilegedUser($roles) && !\is_null($permissions)) { + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { foreach (Database::PERMISSIONS as $type) { foreach ($permissions as $permission) { $permission = Permission::parse($permission); @@ -3249,29 +3350,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $permissions = $document->getPermissions() ?? []; } - $data = \array_merge($document->getArrayCopy(), $data); // Merge existing data with new data - $data['$collection'] = $collection->getId(); // Make sure user doesn't switch collectionID - $data['$createdAt'] = $document->getCreatedAt(); // Make sure user doesn't switch createdAt - $data['$id'] = $document->getId(); // Make sure user doesn't switch document unique ID + $data['$id'] = $documentId; $data['$permissions'] = $permissions; $newDocument = new Document($data); - $checkPermissions = function (Document $collection, Document $document, Document $old, string $permission) use (&$checkPermissions, $dbForProject, $database) { - $documentSecurity = $collection->getAttribute('documentSecurity', false); - $validator = new Authorization($permission); - - $valid = $validator->isValid($collection->getPermissionsByType($permission)); - if (!$documentSecurity && !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - - if ($permission === Database::PERMISSION_UPDATE) { - $valid = $valid || $validator->isValid($old->getPermissionsByType($permission)); - if ($documentSecurity && !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - } - + $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database) { $relationships = \array_filter( $collection->getAttribute('attributes', []), fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP @@ -3298,6 +3381,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum ); foreach ($relations as &$relation) { + // If the relation is an array it can be either update or create a child document. if ( \is_array($relation) && \array_values($relation) !== $relation @@ -3311,21 +3395,20 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), $relation->getId() )); + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + // Attribute $collection is required for Utopia. + $relation->setAttribute( + '$collection', + 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId() + ); if ($oldDocument->isEmpty()) { - $type = Database::PERMISSION_CREATE; - if (isset($relation['$id']) && $relation['$id'] === 'unique()') { $relation['$id'] = ID::unique(); } - } else { - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); - $relation->setAttribute('$collection', $relatedCollection->getId()); - $type = Database::PERMISSION_UPDATE; } - - $checkPermissions($relatedCollection, $relation, $oldDocument, $type); + $setCollection($relatedCollection, $relation); } } @@ -3335,26 +3418,26 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); } } - }; + }); - $checkPermissions($collection, $newDocument, $document, Database::PERMISSION_UPDATE); + $setCollection($collection, $newDocument); - try { - $document = $dbForProject->withRequestTimestamp( - $requestTimestamp, - fn() => $dbForProject->updateDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), - $document->getId(), - $newDocument - ) - ); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } catch (DuplicateException) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); - } catch (StructureException $exception) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $exception->getMessage()); - } + try { + $document = $dbForProject->withRequestTimestamp( + $requestTimestamp, + fn() => $dbForProject->updateDocument( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $document->getId(), + $newDocument + ) + ); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (DuplicateException) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + } catch (StructureException $exception) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $exception->getMessage()); + } // Add $collectionId and $databaseId for all documents $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { @@ -3409,6 +3492,8 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete') ->label('audits.event', 'document.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{request.documentId}') + ->label('usage.metric', 'documents.{scope}.requests.delete') + ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->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) @@ -3430,19 +3515,19 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu ->inject('deletes') ->inject('mode') ->action(function (string $databaseId, string $collectionId, string $documentId, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $events, Delete $deletes, string $mode) { - $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); - if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } // Read permission should not be required for delete @@ -3452,68 +3537,18 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu throw new Exception(Exception::DOCUMENT_NOT_FOUND); } - $checkPermissions = function (Document $collection, Document $document) use (&$checkPermissions, $dbForProject, $database) { - $documentSecurity = $collection->getAttribute('documentSecurity', false); - $validator = new Authorization(Database::PERMISSION_DELETE); - - $valid = $validator->isValid($collection->getDelete()); - if (!$documentSecurity && !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - - $valid = $valid || $validator->isValid($document->getDelete()); - if ($documentSecurity && !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - - $relationships = \array_filter( - $collection->getAttribute('attributes', []), - fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) - ); - - foreach ($related as $relation) { - if ( - $relation instanceof Document - && $relationship->getAttribute('onDelete') === Database::RELATION_MUTATE_CASCADE - ) { - $checkPermissions($relatedCollection, $relation); - } - } - } - }; - - $checkPermissions($collection, $document); - - Authorization::skip(fn() => $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { + $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { try { $dbForProject->deleteDocument( 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId ); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); } catch (RestrictedException) { throw new Exception(Exception::DOCUMENT_DELETE_RESTRICTED); } - })); - - $dbForProject->deleteCachedDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), - $documentId - ); + }); // Add $collectionId and $databaseId for all documents $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { @@ -3567,7 +3602,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu App::get('/v1/databases/usage') ->desc('Get usage stats for the database') - ->groups(['api', 'database', 'usage']) + ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') @@ -3580,62 +3615,112 @@ App::get('/v1/databases/usage') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - METRIC_DATABASES, - METRIC_COLLECTIONS, - METRIC_DOCUMENTS, - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; + + $metrics = [ + 'databases.$all.count.total', + 'documents.$all.count.total', + 'collections.$all.count.total', + 'databases.$all.requests.create', + 'databases.$all.requests.read', + 'databases.$all.requests.update', + 'databases.$all.requests.delete', + 'collections.$all.requests.create', + 'collections.$all.requests.read', + 'collections.$all.requests.update', + 'collections.$all.requests.delete', + 'documents.$all.requests.create', + 'documents.$all.requests.read', + 'documents.$all.requests.update', + 'documents.$all.requests.delete' + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + // Added 3'rd level to Index [period, metric, time] because of order by. + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'databasesCount' => $stats['databases.$all.count.total'] ?? [], + 'documentsCount' => $stats['documents.$all.count.total'] ?? [], + 'collectionsCount' => $stats['collections.$all.count.total'] ?? [], + 'documentsCreate' => $stats['documents.$all.requests.create'] ?? [], + 'documentsRead' => $stats['documents.$all.requests.read'] ?? [], + 'documentsUpdate' => $stats['documents.$all.requests.update'] ?? [], + 'documentsDelete' => $stats['documents.$all.requests.delete'] ?? [], + 'collectionsCreate' => $stats['collections.$all.requests.create'] ?? [], + 'collectionsRead' => $stats['collections.$all.requests.read'] ?? [], + 'collectionsUpdate' => $stats['collections.$all.requests.update'] ?? [], + 'collectionsDelete' => $stats['collections.$all.requests.delete'] ?? [], + 'databasesCreate' => $stats['databases.$all.requests.create'] ?? [], + 'databasesRead' => $stats['databases.$all.requests.read'] ?? [], + 'databasesUpdate' => $stats['databases.$all.requests.update'] ?? [], + 'databasesDelete' => $stats['databases.$all.requests.delete'] ?? [], + ]); } - } - $response->dynamic(new Document([ - 'range' => $range, - 'databasesTotal' => $usage[$metrics[0]], - 'collectionsTotal' => $usage[$metrics[1]], - 'documentsTotal' => $usage[$metrics[2]], - ]), Response::MODEL_USAGE_DATABASES); + + $response->dynamic($usage, Response::MODEL_USAGE_DATABASES); }); App::get('/v1/databases/:databaseId/usage') ->desc('Get usage stats for the database') - ->groups(['api', 'database', 'usage']) + ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') @@ -3649,68 +3734,103 @@ App::get('/v1/databases/:databaseId/usage') ->inject('dbForProject') ->action(function (string $databaseId, string $range, Response $response, Database $dbForProject) { - $database = $dbForProject->getDocument('databases', $databaseId); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'collectionsTotal' => $usage[$metrics[0]], - 'documentsTotal' => $usage[$metrics[1]], - ]), Response::MODEL_USAGE_DATABASE); + $metrics = [ + 'collections.' . $databaseId . '.count.total', + 'collections.' . $databaseId . '.requests.create', + 'collections.' . $databaseId . '.requests.read', + 'collections.' . $databaseId . '.requests.update', + 'collections.' . $databaseId . '.requests.delete', + 'documents.' . $databaseId . '.count.total', + 'documents.' . $databaseId . '.requests.create', + 'documents.' . $databaseId . '.requests.read', + 'documents.' . $databaseId . '.requests.update', + 'documents.' . $databaseId . '.requests.delete' + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + // TODO@kodumbeats explore performance if query is ordered by time ASC + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'collectionsCount' => $stats["collections.{$databaseId}.count.total"] ?? [], + 'collectionsCreate' => $stats["collections.{$databaseId}.requests.create"] ?? [], + 'collectionsRead' => $stats["collections.{$databaseId}.requests.read"] ?? [], + 'collectionsUpdate' => $stats["collections.{$databaseId}.requests.update"] ?? [], + 'collectionsDelete' => $stats["collections.{$databaseId}.requests.delete"] ?? [], + 'documentsCount' => $stats["documents.{$databaseId}.count.total"] ?? [], + 'documentsCreate' => $stats["documents.{$databaseId}.requests.create"] ?? [], + 'documentsRead' => $stats["documents.{$databaseId}.requests.read"] ?? [], + 'documentsUpdate' => $stats["documents.{$databaseId}.requests.update"] ?? [], + 'documentsDelete' => $stats["documents.{$databaseId}.requests.delete"] ?? [], + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_DATABASE); }); App::get('/v1/databases/:databaseId/collections/:collectionId/usage') ->alias('/v1/database/:collectionId/usage', ['databaseId' => 'default']) ->desc('Get usage stats for a collection') - ->groups(['api', 'database', 'usage']) + ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') @@ -3733,52 +3853,84 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'documentsTotal' => $usage[$metrics[0]], - ]), Response::MODEL_USAGE_COLLECTION); + $metrics = [ + "documents.{$databaseId}/{$collectionId}.count.total", + "documents.{$databaseId}/{$collectionId}.requests.create", + "documents.{$databaseId}/{$collectionId}.requests.read", + "documents.{$databaseId}/{$collectionId}.requests.update", + "documents.{$databaseId}/{$collectionId}.requests.delete", + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'documentsCount' => $stats["documents.{$databaseId}/{$collectionId}.count.total"] ?? [], + 'documentsCreate' => $stats["documents.{$databaseId}/{$collectionId}.requests.create"] ?? [], + 'documentsRead' => $stats["documents.{$databaseId}/{$collectionId}.requests.read"] ?? [], + 'documentsUpdate' => $stats["documents.{$databaseId}/{$collectionId}.requests.update"] ?? [], + 'documentsDelete' => $stats["documents.{$databaseId}/{$collectionId}.requests.delete" ?? []] + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_COLLECTION); }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 81500f1d27..a286b4f567 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -8,8 +8,12 @@ use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Event\Usage; use Appwrite\Event\Validator\Event as ValidatorEvent; +use Appwrite\Utopia\Response\Model\Rule; use Appwrite\Extend\Exception; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Messaging\Adapter\Realtime; +use Utopia\Validator\Assoc; +use Appwrite\Usage\Stats; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -41,9 +45,79 @@ use Utopia\CLI\Console; use Utopia\Database\Validator\Roles; use Utopia\Validator\Boolean; use Utopia\Database\Exception\Duplicate as DuplicateException; +use MaxMind\Db\Reader; +use Utopia\VCS\Adapter\Git\GitHub; include_once __DIR__ . '/../shared/api.php'; +$redeployVcs = function (Request $request, Document $function, Document $project, Document $installation, Database $dbForProject, Document $template, GitHub $github) { + $deploymentId = ID::unique(); + $entrypoint = $function->getAttribute('entrypoint', ''); + $providerInstallationId = $installation->getAttribute('providerInstallationId', ''); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + $owner = $github->getOwnerName($providerInstallationId); + $providerRepositoryId = $function->getAttribute('providerRepositoryId', ''); + $repositoryName = $github->getRepositoryName($providerRepositoryId); + $providerBranch = $function->getAttribute('providerBranch', 'main'); + $authorUrl = "https://github.com/$owner"; + $repositoryUrl = "https://github.com/$owner/$repositoryName"; + $branchUrl = "https://github.com/$owner/$repositoryName/tree/$providerBranch"; + + $commitDetails = []; + if ($template->isEmpty()) { + try { + $commitDetails = $github->getLatestCommit($owner, $repositoryName, $providerBranch); + } catch (\Throwable $error) { + Console::warning('Failed to get latest commit details'); + Console::warning($error->getMessage()); + Console::warning($error->getTraceAsString()); + } + } + + $deployment = $dbForProject->createDocument('deployments', new Document([ + '$id' => $deploymentId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'resourceId' => $function->getId(), + 'resourceType' => 'functions', + 'entrypoint' => $entrypoint, + 'commands' => $function->getAttribute('commands', ''), + 'type' => 'vcs', + 'installationId' => $installation->getId(), + 'installationInternalId' => $installation->getInternalId(), + 'providerRepositoryId' => $providerRepositoryId, + 'repositoryId' => $function->getAttribute('repositoryId', ''), + 'repositoryInternalId' => $function->getAttribute('repositoryInternalId', ''), + 'providerBranchUrl' => $branchUrl, + 'providerRepositoryName' => $repositoryName, + 'providerRepositoryOwner' => $owner, + 'providerRepositoryUrl' => $repositoryUrl, + 'providerCommitHash' => $commitDetails['commitHash'] ?? '', + 'providerCommitAuthorUrl' => $authorUrl, + 'providerCommitAuthor' => $commitDetails['commitAuthor'] ?? '', + 'providerCommitMessage' => $commitDetails['commitMessage'] ?? '', + 'providerCommitUrl' => $commitDetails['commitUrl'] ?? '', + 'providerBranch' => $providerBranch, + 'providerRootDirectory' => $function->getAttribute('providerRootDirectory', ''), + 'search' => implode(' ', [$deploymentId, $entrypoint]), + 'activate' => true, + ])); + + $buildEvent = new Build(); + $buildEvent + ->setType(BUILD_TYPE_DEPLOYMENT) + ->setResource($function) + ->setDeployment($deployment) + ->setTemplate($template) + ->setProject($project) + ->trigger(); +}; + App::post('/v1/functions') ->groups(['api', 'functions']) ->desc('Create Function') @@ -60,25 +134,65 @@ App::post('/v1/functions') ->label('sdk.response.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('execute', [], new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.', true) ->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.') + ->param('execute', [], new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), '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 ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.', true) ->param('events', [], new ArrayList(new ValidatorEvent(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.', true) ->param('schedule', '', new Cron(), 'Schedule CRON syntax.', true) ->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Function maximum execution time in seconds.', true) - ->param('enabled', true, new Boolean(), 'Is function enabled?', true) + ->param('enabled', true, new Boolean(), '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.', true) + ->param('logging', true, new Boolean(), 'Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.', true) + ->param('entrypoint', '', new Text(1028, 0), 'Entrypoint File. This path is relative to the "providerRootDirectory".', true) + ->param('commands', '', new Text(8192, 0), 'Build Commands.', true) + ->param('installationId', '', new Text(128, 0), 'Appwrite Installation ID for VCS (Version Control System) deployment.', true) + ->param('providerRepositoryId', '', new Text(128, 0), 'Repository ID of the repo linked to the function.', true) + ->param('providerBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function.', true) + ->param('providerSilentMode', false, new Boolean(), '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.', true) + ->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo.', true) + ->param('templateRepository', '', new Text(128, 0), 'Repository name of the template.', true) + ->param('templateOwner', '', new Text(128, 0), 'The name of the owner of the template.', true) + ->param('templateRootDirectory', '', new Text(128, 0), 'Path to function code in the template repo.', true) + ->param('templateBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function template.', true) + ->inject('request') ->inject('response') ->inject('dbForProject') ->inject('project') ->inject('user') ->inject('events') ->inject('dbForConsole') - ->action(function (string $functionId, string $name, array $execute, string $runtime, array $events, string $schedule, int $timeout, bool $enabled, Response $response, Database $dbForProject, Document $project, Document $user, Event $eventsInstance, Database $dbForConsole) { - + ->inject('gitHub') + ->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateBranch, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $eventsInstance, Database $dbForConsole, GitHub $github) use ($redeployVcs) { $functionId = ($functionId == 'unique()') ? ID::unique() : $functionId; + + // build from template + $template = new Document([]); + if ( + !empty($templateRepository) + && !empty($templateOwner) + && !empty($templateRootDirectory) + && !empty($templateBranch) + ) { + $template->setAttribute('repositoryName', $templateRepository) + ->setAttribute('ownerName', $templateOwner) + ->setAttribute('rootDirectory', $templateRootDirectory) + ->setAttribute('branch', $templateBranch); + } + + $installation = $dbForConsole->getDocument('installations', $installationId); + + if (!empty($installationId) && $installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + if (!empty($providerRepositoryId) && (empty($installationId) || empty($providerBranch))) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'When connecting to VCS (Version Control System), you need to provide "installationId" and "providerBranch".'); + } + $function = $dbForProject->createDocument('functions', new Document([ '$id' => $functionId, 'execute' => $execute, 'enabled' => $enabled, + 'live' => true, + 'logging' => $logging, 'name' => $name, 'runtime' => $runtime, 'deploymentInternalId' => '', @@ -86,12 +200,24 @@ App::post('/v1/functions') 'events' => $events, 'schedule' => $schedule, 'scheduleInternalId' => '', + 'scheduleId' => '', 'timeout' => $timeout, - 'search' => implode(' ', [$functionId, $name, $runtime]) + 'entrypoint' => $entrypoint, + 'commands' => $commands, + 'search' => implode(' ', [$functionId, $name, $runtime]), + 'version' => 'v3', + 'installationId' => $installation->getId(), + 'installationInternalId' => $installation->getInternalId(), + 'providerRepositoryId' => $providerRepositoryId, + 'repositoryId' => '', + 'repositoryInternalId' => '', + 'providerBranch' => $providerBranch, + 'providerRootDirectory' => $providerRootDirectory, + 'providerSilentMode' => $providerSilentMode, ])); $schedule = Authorization::skip( - fn() => $dbForConsole->createDocument('schedules', new Document([ + fn () => $dbForConsole->createDocument('schedules', new Document([ 'region' => App::getEnv('_APP_REGION', 'default'), // Todo replace with projects region 'resourceType' => 'function', 'resourceId' => $function->getId(), @@ -105,7 +231,99 @@ App::post('/v1/functions') $function->setAttribute('scheduleId', $schedule->getId()); $function->setAttribute('scheduleInternalId', $schedule->getInternalId()); - $dbForProject->updateDocument('functions', $function->getId(), $function); + + // Git connect logic + if (!empty($providerRepositoryId)) { + $repository = $dbForConsole->createDocument('repositories', new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'installationId' => $installation->getId(), + 'installationInternalId' => $installation->getInternalId(), + 'projectId' => $project->getId(), + 'projectInternalId' => $project->getInternalId(), + 'providerRepositoryId' => $providerRepositoryId, + 'resourceId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), + 'resourceType' => 'function', + 'providerPullRequestIds' => [] + ])); + + $function->setAttribute('repositoryId', $repository->getId()); + $function->setAttribute('repositoryInternalId', $repository->getInternalId()); + } + + $function = $dbForProject->updateDocument('functions', $function->getId(), $function); + + // Redeploy vcs logic + if (!empty($providerRepositoryId)) { + $redeployVcs($request, $function, $project, $installation, $dbForProject, $template, $github); + } + + $functionsDomain = App::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + if (!empty($functionsDomain)) { + $ruleId = ID::unique(); + $routeSubdomain = ID::unique(); + $domain = "{$routeSubdomain}.{$functionsDomain}"; + + $rule = Authorization::skip( + fn () => $dbForConsole->createDocument('rules', new Document([ + '$id' => $ruleId, + 'projectId' => $project->getId(), + 'projectInternalId' => $project->getInternalId(), + 'domain' => $domain, + 'resourceType' => 'function', + 'resourceId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), + 'status' => 'verified', + 'certificateId' => '', + ])) + ); + + /** Trigger Webhook */ + $ruleModel = new Rule(); + $ruleCreate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME); + $ruleCreate + ->setProject($project) + ->setEvent('rules.[ruleId].create') + ->setParam('ruleId', $rule->getId()) + ->setPayload($rule->getArrayCopy(array_keys($ruleModel->getRules()))) + ->trigger(); + + /** Trigger Functions */ + $ruleCreate + ->setClass(Event::FUNCTIONS_CLASS_NAME) + ->setQueue(Event::FUNCTIONS_QUEUE_NAME) + ->trigger(); + + /** Trigger realtime event */ + $allEvents = Event::generateEvents('rules.[ruleId].create', [ + 'ruleId' => $rule->getId(), + ]); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $rule, + project: $project + ); + Realtime::send( + projectId: 'console', + payload: $rule->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); + Realtime::send( + projectId: $project->getId(), + payload: $rule->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); + } $eventsInstance->setParam('functionId', $function->getId()); @@ -138,7 +356,9 @@ App::get('/v1/functions') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -233,66 +453,92 @@ App::get('/v1/functions/:functionId/usage') throw new Exception(Exception::FUNCTION_NOT_FOUND); } - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS), - str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE), - str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS), - str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE), - str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), - str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS), - str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'deploymentsTotal' => $usage[$metrics[0]], - 'deploymentsStorage' => $usage[$metrics[1]], - 'buildsTotal' => $usage[$metrics[2]], - 'buildsStorage' => $usage[$metrics[3]], - 'buildsTime' => $usage[$metrics[4]], - 'executionsTotal' => $usage[$metrics[5]], - 'executionsTime' => $usage[$metrics[6]], - ]), Response::MODEL_USAGE_FUNCTION); + $metrics = [ + "executions.$functionId.compute.total", + "executions.$functionId.compute.success", + "executions.$functionId.compute.failure", + "executions.$functionId.compute.time", + "builds.$functionId.compute.total", + "builds.$functionId.compute.success", + "builds.$functionId.compute.failure", + "builds.$functionId.compute.time", + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'executionsTotal' => $stats["executions.$functionId.compute.total"] ?? [], + 'executionsFailure' => $stats["executions.$functionId.compute.failure"] ?? [], + 'executionsSuccesse' => $stats["executions.$functionId.compute.success"] ?? [], + 'executionsTime' => $stats["executions.$functionId.compute.time"] ?? [], + 'buildsTotal' => $stats["builds.$functionId.compute.total"] ?? [], + 'buildsFailure' => $stats["builds.$functionId.compute.failure"] ?? [], + 'buildsSuccess' => $stats["builds.$functionId.compute.success"] ?? [], + 'buildsTime' => $stats["builds.$functionId.compute.time" ?? []] + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_FUNCTION); }); App::get('/v1/functions/usage') @@ -310,67 +556,92 @@ App::get('/v1/functions/usage') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - METRIC_FUNCTIONS, - METRIC_DEPLOYMENTS, - METRIC_DEPLOYMENTS_STORAGE, - METRIC_BUILDS, - METRIC_BUILDS_STORAGE, - METRIC_BUILDS_COMPUTE, - METRIC_EXECUTIONS, - METRIC_EXECUTIONS_COMPUTE, - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; + + $metrics = [ + 'executions.$all.compute.total', + 'executions.$all.compute.failure', + 'executions.$all.compute.success', + 'executions.$all.compute.time', + 'builds.$all.compute.total', + 'builds.$all.compute.failure', + 'builds.$all.compute.success', + 'builds.$all.compute.time', + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'executionsTotal' => $stats[$metrics[0]] ?? [], + 'executionsFailure' => $stats[$metrics[1]] ?? [], + 'executionsSuccess' => $stats[$metrics[2]] ?? [], + 'executionsTime' => $stats[$metrics[3]] ?? [], + 'buildsTotal' => $stats[$metrics[4]] ?? [], + 'buildsFailure' => $stats[$metrics[5]] ?? [], + 'buildsSuccess' => $stats[$metrics[6]] ?? [], + 'buildsTime' => $stats[$metrics[7]] ?? [], + ]); } - } - $response->dynamic(new Document([ - 'range' => $range, - 'functionsTotal' => $usage[$metrics[0]], - 'deploymentsTotal' => $usage[$metrics[1]], - 'deploymentsStorage' => $usage[$metrics[2]], - 'buildsTotal' => $usage[$metrics[3]], - 'buildsStorage' => $usage[$metrics[4]], - 'buildsTime' => $usage[$metrics[5]], - 'executionsTotal' => $usage[$metrics[6]], - 'executionsTime' => $usage[$metrics[7]], - ]), Response::MODEL_USAGE_FUNCTIONS); + + $response->dynamic($usage, Response::MODEL_USAGE_FUNCTIONS); }); App::put('/v1/functions/:functionId') @@ -389,18 +660,29 @@ App::put('/v1/functions/:functionId') ->label('sdk.response.model', Response::MODEL_FUNCTION) ->param('functionId', '', new UID(), 'Function ID.') ->param('name', '', new Text(128), 'Function name. Max length: 128 chars.') - ->param('execute', [], new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.', true) + ->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.') + ->param('execute', [], new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), '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 ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.', true) ->param('events', [], new ArrayList(new ValidatorEvent(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.', true) ->param('schedule', '', new Cron(), 'Schedule CRON syntax.', true) ->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Maximum execution time in seconds.', true) - ->param('enabled', true, new Boolean(), 'Is function enabled?', true) + ->param('enabled', true, new Boolean(), '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.', true) + ->param('logging', true, new Boolean(), 'Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.', true) + ->param('entrypoint', '', new Text(1028, 0), 'Entrypoint File. This path is relative to the "providerRootDirectory".', true) + ->param('commands', '', new Text(8192, 0), 'Build Commands.', true) + ->param('installationId', '', new Text(128, 0), 'Appwrite Installation ID for VCS (Version Controle System) deployment.', true) + ->param('providerRepositoryId', '', new Text(128, 0), 'Repository ID of the repo linked to the function', true) + ->param('providerBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function', true) + ->param('providerSilentMode', false, new Boolean(), '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.', true) + ->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo.', true) + ->inject('request') ->inject('response') ->inject('dbForProject') ->inject('project') - ->inject('user') ->inject('events') ->inject('dbForConsole') - ->action(function (string $functionId, string $name, array $execute, array $events, string $schedule, int $timeout, bool $enabled, Response $response, Database $dbForProject, Document $project, Document $user, Event $eventsInstance, Database $dbForConsole) { + ->inject('gitHub') + ->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, Request $request, Response $response, Database $dbForProject, Document $project, Event $eventsInstance, Database $dbForConsole, GitHub $github) use ($redeployVcs) { + // TODO: If only branch changes, re-deploy $function = $dbForProject->getDocument('functions', $functionId); @@ -408,18 +690,122 @@ App::put('/v1/functions/:functionId') throw new Exception(Exception::FUNCTION_NOT_FOUND); } + $installation = $dbForConsole->getDocument('installations', $installationId); + + if (!empty($installationId) && $installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + if (!empty($providerRepositoryId) && (empty($installationId) || empty($providerBranch))) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'When connecting to VCS (Version Control System), you need to provide "installationId" and "providerBranch".'); + } + + if ($function->isEmpty()) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); + } + $enabled ??= $function->getAttribute('enabled', true); + $repositoryId = $function->getAttribute('repositoryId', ''); + $repositoryInternalId = $function->getAttribute('repositoryInternalId', ''); + + if (empty($entrypoint)) { + $entrypoint = $function->getAttribute('entrypoint', ''); + } + + $isConnected = !empty($function->getAttribute('providerRepositoryId', '')); + + // Git disconnect logic + if ($isConnected && empty($providerRepositoryId)) { + $repositories = $dbForConsole->find('repositories', [ + Query::equal('projectInternalId', [$project->getInternalId()]), + Query::equal('resourceInternalId', [$function->getInternalId()]), + Query::equal('resourceType', ['function']), + Query::limit(100), + ]); + + foreach ($repositories as $repository) { + $dbForConsole->deleteDocument('repositories', $repository->getId()); + } + + $providerRepositoryId = ''; + $installationId = ''; + $providerBranch = ''; + $providerRootDirectory = ''; + $providerSilentMode = true; + $repositoryId = ''; + $repositoryInternalId = ''; + } + + // Git connect logic + if (!$isConnected && !empty($providerRepositoryId)) { + $teamId = $project->getAttribute('teamId', ''); + + $repository = $dbForConsole->createDocument('repositories', new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::team(ID::custom($teamId))), + Permission::update(Role::team(ID::custom($teamId), 'owner')), + Permission::update(Role::team(ID::custom($teamId), 'developer')), + Permission::delete(Role::team(ID::custom($teamId), 'owner')), + Permission::delete(Role::team(ID::custom($teamId), 'developer')), + ], + 'installationId' => $installation->getId(), + 'installationInternalId' => $installation->getInternalId(), + 'projectId' => $project->getId(), + 'projectInternalId' => $project->getInternalId(), + 'providerRepositoryId' => $providerRepositoryId, + 'resourceId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), + 'resourceType' => 'function', + 'providerPullRequestIds' => [] + ])); + + $repositoryId = $repository->getId(); + $repositoryInternalId = $repository->getInternalId(); + } + + $live = true; + + if ( + $function->getAttribute('name') !== $name || + $function->getAttribute('entrypoint') !== $entrypoint || + $function->getAttribute('commands') !== $commands || + $function->getAttribute('providerRootDirectory') !== $providerRootDirectory || + $function->getAttribute('runtime') !== $runtime + ) { + $live = false; + } + $function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [ 'execute' => $execute, 'name' => $name, + 'runtime' => $runtime, 'events' => $events, 'schedule' => $schedule, 'timeout' => $timeout, 'enabled' => $enabled, - 'search' => implode(' ', [$functionId, $name, $function->getAttribute('runtime')]), + 'live' => $live, + 'logging' => $logging, + 'entrypoint' => $entrypoint, + 'commands' => $commands, + 'installationId' => $installation->getId(), + 'installationInternalId' => $installation->getInternalId(), + 'providerRepositoryId' => $providerRepositoryId, + 'repositoryId' => $repositoryId, + 'repositoryInternalId' => $repositoryInternalId, + 'providerBranch' => $providerBranch, + 'providerRootDirectory' => $providerRootDirectory, + 'providerSilentMode' => $providerSilentMode, + 'search' => implode(' ', [$functionId, $name, $runtime]), ]))); + // Redeploy logic + if (!$isConnected && !empty($providerRepositoryId)) { + $redeployVcs($request, $function, $project, $installation, $dbForProject, new Document(), $github); + } + + // Inform scheduler if function is still active $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); $schedule ->setAttribute('resourceUpdatedAt', DateTime::now()) @@ -432,6 +818,93 @@ App::put('/v1/functions/:functionId') $response->dynamic($function, Response::MODEL_FUNCTION); }); +App::get('/v1/functions/:functionId/deployments/:deploymentId/download') + ->groups(['api', 'functions']) + ->desc('Download Deployment') + ->label('scope', 'functions.read') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'functions') + ->label('sdk.method', 'downloadDeployment') + ->label('sdk.description', '/docs/references/functions/download-deployment.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', '*/*') + ->label('sdk.methodType', 'location') + ->param('functionId', '', new UID(), 'Function ID.') + ->param('deploymentId', '', new UID(), 'Deployment ID.') + ->inject('response') + ->inject('request') + ->inject('dbForProject') + ->inject('deviceFunctions') + ->action(function (string $functionId, string $deploymentId, Response $response, Request $request, Database $dbForProject, Device $deviceFunctions) { + + $function = $dbForProject->getDocument('functions', $functionId); + if ($function->isEmpty()) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); + } + + $deployment = $dbForProject->getDocument('deployments', $deploymentId); + if ($deployment->isEmpty()) { + throw new Exception(Exception::DEPLOYMENT_NOT_FOUND); + } + + if ($deployment->getAttribute('resourceId') !== $function->getId()) { + throw new Exception(Exception::DEPLOYMENT_NOT_FOUND); + } + + $path = $deployment->getAttribute('path', ''); + if (!$deviceFunctions->exists($path)) { + throw new Exception(Exception::DEPLOYMENT_NOT_FOUND); + } + + $response + ->setContentType('application/gzip') + ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)) . ' GMT') // 45 days cache + ->addHeader('X-Peak', \memory_get_peak_usage()) + ->addHeader('Content-Disposition', 'attachment; filename="' . $deploymentId . '.tar.gz"') + ; + + $size = $deviceFunctions->getFileSize($path); + $rangeHeader = $request->getHeader('range'); + + if (!empty($rangeHeader)) { + $start = $request->getRangeStart(); + $end = $request->getRangeEnd(); + $unit = $request->getRangeUnit(); + + if ($end === null) { + $end = min(($start + MAX_OUTPUT_CHUNK_SIZE - 1), ($size - 1)); + } + + if ($unit !== 'bytes' || $start >= $end || $end >= $size) { + throw new Exception(Exception::STORAGE_INVALID_RANGE); + } + + $response + ->addHeader('Accept-Ranges', 'bytes') + ->addHeader('Content-Range', 'bytes ' . $start . '-' . $end . '/' . $size) + ->addHeader('Content-Length', $end - $start + 1) + ->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT); + + $response->send($deviceFunctions->read($path, $start, ($end - $start + 1))); + } + + if ($size > APP_STORAGE_READ_BUFFER) { + $response->addHeader('Content-Length', $deviceFunctions->getFileSize($path)); + for ($i = 0; $i < ceil($size / MAX_OUTPUT_CHUNK_SIZE); $i++) { + $response->chunk( + $deviceFunctions->read( + $path, + ($i * MAX_OUTPUT_CHUNK_SIZE), + min(MAX_OUTPUT_CHUNK_SIZE, $size - ($i * MAX_OUTPUT_CHUNK_SIZE)) + ), + (($i + 1) * MAX_OUTPUT_CHUNK_SIZE) >= $size + ); + } + } else { + $response->send($deviceFunctions->read($path)); + } + }); + App::patch('/v1/functions/:functionId/deployments/:deploymentId') ->groups(['api', 'functions']) ->desc('Update Function Deployment') @@ -480,6 +953,7 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId') 'deployment' => $deployment->getId(), ]))); + // Inform scheduler if function is still active $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); $schedule ->setAttribute('resourceUpdatedAt', DateTime::now()) @@ -526,6 +1000,7 @@ App::delete('/v1/functions/:functionId') throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove function from DB'); } + // Inform scheduler to no longer run function $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); $schedule ->setAttribute('resourceUpdatedAt', DateTime::now()) @@ -558,7 +1033,8 @@ App::post('/v1/functions/:functionId/deployments') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DEPLOYMENT) ->param('functionId', '', new UID(), 'Function ID.') - ->param('entrypoint', '', new Text('1028'), 'Entrypoint File.') + ->param('entrypoint', null, new Text(1028), 'Entrypoint File.', true) + ->param('commands', null, new Text(8192, 0), 'Build Commands.', true) ->param('code', [], new File(), '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.', skipValidation: true) ->param('activate', false, new Boolean(true), 'Automatically activate the deployment when it is finished building.') ->inject('request') @@ -568,8 +1044,8 @@ App::post('/v1/functions/:functionId/deployments') ->inject('project') ->inject('deviceFunctions') ->inject('deviceLocal') - ->inject('dbForConsole') - ->action(function (string $functionId, string $entrypoint, mixed $code, bool $activate, Request $request, Response $response, Database $dbForProject, Event $events, Document $project, Device $deviceFunctions, Device $deviceLocal, Database $dbForConsole) { + ->action(function (string $functionId, ?string $entrypoint, ?string $commands, mixed $code, mixed $activate, Request $request, Response $response, Database $dbForProject, Event $events, Document $project, Device $deviceFunctions, Device $deviceLocal) { + $activate = filter_var($activate, FILTER_VALIDATE_BOOLEAN); $function = $dbForProject->getDocument('functions', $functionId); @@ -577,6 +1053,20 @@ App::post('/v1/functions/:functionId/deployments') throw new Exception(Exception::FUNCTION_NOT_FOUND); } + if ($entrypoint === null) { + $entrypoint = $function->getAttribute('entrypoint', ''); + } + + if ($commands === null) { + $commands = $function->getAttribute('entrypoint', ''); + } + + $commands = $function->getAttribute('commands', ''); + + if (empty($entrypoint)) { + throw new Exception(Exception::FUNCTION_ENTRYPOINT_MISSING); + } + $file = $request->getFiles('code'); // GraphQL multipart spec adds files with index keys @@ -687,11 +1177,13 @@ App::post('/v1/functions/:functionId/deployments') 'resourceType' => 'functions', 'buildInternalId' => '', 'entrypoint' => $entrypoint, + 'commands' => $commands, 'path' => $path, 'size' => $fileSize, 'search' => implode(' ', [$deploymentId, $entrypoint]), 'activate' => $activate, 'metadata' => $metadata, + 'type' => 'manual' ])); } else { $deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment->setAttribute('size', $fileSize)->setAttribute('metadata', $metadata)); @@ -719,6 +1211,7 @@ App::post('/v1/functions/:functionId/deployments') 'resourceType' => 'functions', 'buildInternalId' => '', 'entrypoint' => $entrypoint, + 'commands' => $commands, 'path' => $path, 'size' => $fileSize, 'chunksTotal' => $chunks, @@ -726,6 +1219,7 @@ App::post('/v1/functions/:functionId/deployments') 'search' => implode(' ', [$deploymentId, $entrypoint]), 'activate' => $activate, 'metadata' => $metadata, + 'type' => 'manual' ])); } else { $deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment->setAttribute('chunksUploaded', $chunksUploaded)->setAttribute('metadata', $metadata)); @@ -778,7 +1272,9 @@ App::get('/v1/functions/:functionId/deployments') $queries[] = Query::equal('resourceType', ['functions']); // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -800,9 +1296,9 @@ App::get('/v1/functions/:functionId/deployments') foreach ($results as $result) { $build = $dbForProject->getDocument('builds', $result->getAttribute('buildId', '')); $result->setAttribute('status', $build->getAttribute('status', 'processing')); - $result->setAttribute('buildStderr', $build->getAttribute('stderr', '')); - $result->setAttribute('buildStdout', $build->getAttribute('stdout', '')); + $result->setAttribute('buildLogs', $build->getAttribute('logs', '')); $result->setAttribute('buildTime', $build->getAttribute('duration', 0)); + $result->setAttribute('size', $result->getAttribute('size', 0) + $build->getAttribute('size', 0)); } $response->dynamic(new Document([ @@ -845,9 +1341,10 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId') } $build = $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', '')); - $deployment->setAttribute('status', $build->getAttribute('status', 'processing')); - $deployment->setAttribute('buildStderr', $build->getAttribute('stderr', '')); - $deployment->setAttribute('buildStdout', $build->getAttribute('stdout', '')); + $deployment->setAttribute('status', $build->getAttribute('status', 'waiting')); + $deployment->setAttribute('buildLogs', $build->getAttribute('logs', '')); + $deployment->setAttribute('buildTime', $build->getAttribute('duration', 0)); + $deployment->setAttribute('size', $deployment->getAttribute('size', 0) + $build->getAttribute('size', 0)); $response->dynamic($deployment, Response::MODEL_DEPLOYMENT); }); @@ -888,9 +1385,13 @@ App::delete('/v1/functions/:functionId/deployments/:deploymentId') throw new Exception(Exception::DEPLOYMENT_NOT_FOUND); } - if ($deviceFunctions->delete($deployment->getAttribute('path', ''))) { - if (!$dbForProject->deleteDocument('deployments', $deployment->getId())) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove deployment from DB'); + if (!$dbForProject->deleteDocument('deployments', $deployment->getId())) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove deployment from DB'); + } + + if (!empty($deployment->getAttribute('path', ''))) { + if (!($deviceFunctions->delete($deployment->getAttribute('path', '')))) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove deployment from storage'); } } @@ -928,19 +1429,23 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->param('buildId', '', new UID(), 'Build unique ID.') + ->inject('request') ->inject('response') ->inject('dbForProject') + ->inject('dbForConsole') ->inject('project') + ->inject('gitHub') ->inject('events') - ->action(function (string $functionId, string $deploymentId, string $buildId, Response $response, Database $dbForProject, Document $project, Event $events) { + ->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Database $dbForConsole, Document $project, GitHub $github, Event $events) use ($redeployVcs) { $function = $dbForProject->getDocument('functions', $functionId); - $deployment = $dbForProject->getDocument('deployments', $deploymentId); if ($function->isEmpty()) { throw new Exception(Exception::FUNCTION_NOT_FOUND); } + $deployment = $dbForProject->getDocument('deployments', $deploymentId); + if ($deployment->isEmpty()) { throw new Exception(Exception::DEPLOYMENT_NOT_FOUND); } @@ -951,23 +1456,30 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') throw new Exception(Exception::BUILD_NOT_FOUND); } - if ($build->getAttribute('status') !== 'failed') { - throw new Exception(Exception::BUILD_IN_PROGRESS, 'Build not failed'); - } + $deploymentId = ID::unique(); - $events - ->setParam('functionId', $function->getId()) - ->setParam('deploymentId', $deployment->getId()); + $deployment = $dbForProject->createDocument('deployments', $deployment->setAttributes([ + '$id' => $deploymentId, + 'buildId' => '', + 'buildInternalId' => '', + 'entrypoint' => $function->getAttribute('entrypoint'), + 'commands' => $function->getAttribute('commands', ''), + 'search' => implode(' ', [$deploymentId, $function->getAttribute('entrypoint')]), + ])); - // Retry the build $buildEvent = new Build(); + $buildEvent - ->setType(BUILD_TYPE_RETRY) + ->setType(BUILD_TYPE_DEPLOYMENT) ->setResource($function) ->setDeployment($deployment) ->setProject($project) ->trigger(); + $events + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + $response->noContent(); }); @@ -983,28 +1495,30 @@ App::post('/v1/functions/:functionId/executions') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_EXECUTION) - ->label('abuse-key', 'ip:{ip},userId:{userId}') - ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) - ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->param('functionId', '', new UID(), 'Function ID.') - ->param('data', '', new Text(8192), 'String of custom data to send to function.', true) + ->param('body', '', new Text(8192, 0), 'HTTP body of execution. Default value is empty string.', true) ->param('async', false, new Boolean(), 'Execute code in the background. Default value is false.', true) + ->param('path', '/', new Text(2048), 'HTTP path of execution. Path can include query params. Default value is /', true) + ->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], true), 'HTTP method of execution. Default value is GET.', true) + ->param('headers', [], new Assoc(), 'HTTP headers of execution. Defaults to empty.', true) ->inject('response') ->inject('project') ->inject('dbForProject') ->inject('user') ->inject('events') + ->inject('usage') ->inject('mode') ->inject('queueForFunctions') - ->inject('queueForUsage') - ->action(function (string $functionId, string $data, bool $async, Response $response, Document $project, Database $dbForProject, Document $user, Event $events, string $mode, Func $queueForFunctions, Usage $queueForUsage) { + ->inject('geodb') + ->action(function (string $functionId, string $body, bool $async, string $path, string $method, array $headers, Response $response, Document $project, Database $dbForProject, Document $user, Event $events, Stats $usage, string $mode, Func $queueForFunctions, Reader $geodb) { $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); - if ($function->isEmpty() || !$function->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::FUNCTION_NOT_FOUND); - } + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($function->isEmpty() || (!$function->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); } $runtimes = Config::getParam('runtimes', []); @@ -1041,25 +1555,6 @@ App::post('/v1/functions/:functionId/executions') throw new Exception(Exception::USER_UNAUTHORIZED, $validator->getDescription()); } - $executionId = ID::unique(); - - /** @var Document $execution */ - $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', new Document([ - '$id' => $executionId, - '$permissions' => !$user->isEmpty() ? [Permission::read(Role::user($user->getId()))] : [], - 'functionInternalId' => $function->getInternalId(), - 'functionId' => $function->getId(), - 'deploymentInternalId' => $deployment->getInternalId(), - 'deploymentId' => $deployment->getId(), - 'trigger' => 'http', // http / schedule / event - 'status' => $async ? 'waiting' : 'processing', // waiting / processing / completed / failed - 'statusCode' => 0, - 'response' => '', - 'stderr' => '', - 'duration' => 0.0, - 'search' => implode(' ', [$functionId, $executionId]), - ]))); - $jwt = ''; // initialize if (!$user->isEmpty()) { // If userId exists, generate a JWT for function $sessions = $user->getAttribute('sessions', []); @@ -1081,17 +1576,74 @@ App::post('/v1/functions/:functionId/executions') } } + $headers['x-appwrite-trigger'] = 'http'; + $headers['x-appwrite-user-id'] = $user->getId() ?? ''; + $headers['x-appwrite-user-jwt'] = $jwt ?? ''; + $headers['x-appwrite-country-code'] = ''; + $headers['x-appwrite-continent-code'] = ''; + $headers['x-appwrite-continent-eu'] = 'false'; + + $ip = $headers['x-real-ip'] ?? ''; + if (!empty($ip)) { + $record = $geodb->get($ip); + + if ($record) { + $eu = Config::getParam('locale-eu'); + + $headers['x-appwrite-country-code'] = $record['country']['iso_code'] ?? ''; + $headers['x-appwrite-continent-code'] = $record['continent']['code'] ?? ''; + $headers['x-appwrite-continent-eu'] = (\in_array($record['country']['iso_code'], $eu)) ? 'true' : 'false'; + } + } + + $headersFiltered = []; + foreach ($headers as $key => $value) { + if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_REQUEST)) { + $headersFiltered[] = ['name' => $key, 'value' => $value]; + } + } + + $executionId = ID::unique(); + + $execution = new Document([ + '$id' => $executionId, + '$permissions' => !$user->isEmpty() ? [Permission::read(Role::user($user->getId()))] : [], + 'functionInternalId' => $function->getInternalId(), + 'functionId' => $function->getId(), + 'deploymentInternalId' => $deployment->getInternalId(), + 'deploymentId' => $deployment->getId(), + 'trigger' => 'http', // http / schedule / event + 'status' => $async ? 'waiting' : 'processing', // waiting / processing / completed / failed + 'responseStatusCode' => 0, + 'responseHeaders' => [], + 'requestPath' => $path, + 'requestMethod' => $method, + 'requestHeaders' => $headersFiltered, + 'errors' => '', + 'logs' => '', + 'duration' => 0.0, + 'search' => implode(' ', [$functionId, $executionId]), + ]); + $events ->setParam('functionId', $function->getId()) ->setParam('executionId', $execution->getId()) ->setContext('function', $function); if ($async) { + if ($function->getAttribute('logging')) { + /** @var Document $execution */ + $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution)); + } + $queueForFunctions ->setType('http') ->setExecution($execution) ->setFunction($function) - ->setData($data) + ->setBody($body) + ->setHeaders($headers) + ->setPath($path) + ->setMethod($method) ->setJWT($jwt) ->setProject($project) ->setUser($user) @@ -1102,73 +1654,107 @@ App::post('/v1/functions/:functionId/executions') ->dynamic($execution, Response::MODEL_EXECUTION); } - $vars = array_reduce($function->getAttribute('vars', []), function (array $carry, Document $var) { + $durationStart = \microtime(true); + + $vars = []; + + // Shared vars + foreach ($project->getAttribute('variables', []) as $var) { + $vars[$var->getAttribute('key')] = $var->getAttribute('value', ''); + } + + // Function vars + $vars = \array_merge($vars, array_reduce($function->getAttribute('vars', []), function (array $carry, Document $var) { $carry[$var->getAttribute('key')] = $var->getAttribute('value') ?? ''; return $carry; - }, []); + }, [])); + // Appwrite vars $vars = \array_merge($vars, [ - 'APPWRITE_FUNCTION_ID' => $function->getId(), + 'APPWRITE_FUNCTION_ID' => $functionId, 'APPWRITE_FUNCTION_NAME' => $function->getAttribute('name'), 'APPWRITE_FUNCTION_DEPLOYMENT' => $deployment->getId(), 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), - 'APPWRITE_FUNCTION_TRIGGER' => 'http', 'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '', 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '', - 'APPWRITE_FUNCTION_DATA' => $data ?? '', - 'APPWRITE_FUNCTION_USER_ID' => $user->getId() ?? '', - 'APPWRITE_FUNCTION_JWT' => $jwt ?? '', ]); /** Execute function */ $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); try { + $command = $runtime['startCommand']; $executionResponse = $executor->createExecution( projectId: $project->getId(), deploymentId: $deployment->getId(), - payload: $data, + body: \strlen($body) > 0 ? $body : null, variables: $vars, timeout: $function->getAttribute('timeout', 0), image: $runtime['image'], - source: $build->getAttribute('outputPath', ''), + source: $build->getAttribute('path', ''), entrypoint: $deployment->getAttribute('entrypoint', ''), + version: $function->getAttribute('version'), + path: $path, + method: $method, + headers: $headers, + runtimeEntrypoint: 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '"' ); + $headersFiltered = []; + foreach ($executionResponse['headers'] as $key => $value) { + if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_RESPONSE)) { + $headersFiltered[] = ['name' => $key, 'value' => $value]; + } + } + /** Update execution status */ - $execution->setAttribute('status', $executionResponse['status']); - $execution->setAttribute('statusCode', $executionResponse['statusCode']); - $execution->setAttribute('response', $executionResponse['response']); - $execution->setAttribute('stdout', $executionResponse['stdout']); - $execution->setAttribute('stderr', $executionResponse['stderr']); + $status = $executionResponse['statusCode'] >= 400 ? 'failed' : 'completed'; + $execution->setAttribute('status', $status); + $execution->setAttribute('responseStatusCode', $executionResponse['statusCode']); + $execution->setAttribute('responseHeaders', $headersFiltered); + $execution->setAttribute('logs', $executionResponse['logs']); + $execution->setAttribute('errors', $executionResponse['errors']); $execution->setAttribute('duration', $executionResponse['duration']); - /** - * Sync execution compute usage from - */ - $queueForUsage - ->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($executionResponse['duration'] * 1000))// per project - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($executionResponse['duration'] * 1000))// per function - ; } catch (\Throwable $th) { - $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); + $durationEnd = \microtime(true); + $execution - ->setAttribute('duration', (float)$interval->format('%s.%f')) + ->setAttribute('duration', $durationEnd - $durationStart) ->setAttribute('status', 'failed') - ->setAttribute('statusCode', $th->getCode()) - ->setAttribute('stderr', $th->getMessage()); + ->setAttribute('responseStatusCode', 500) + ->setAttribute('errors', $th->getMessage() . '\nError Code: ' . $th->getCode()); Console::error($th->getMessage()); } - Authorization::skip(fn () => $dbForProject->updateDocument('executions', $executionId, $execution)); + if ($function->getAttribute('logging')) { + /** @var Document $execution */ + $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution)); + } + + // TODO revise this later using route label + $usage + ->setParam('functionId', $function->getId()) + ->setParam('executions.{scope}.compute', 1) + ->setParam('executionStatus', $execution->getAttribute('status', '')) + ->setParam('executionTime', $execution->getAttribute('duration')); // ms + $roles = Authorization::getRoles(); $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); if (!$isPrivilegedUser && !$isAppUser) { - $execution->setAttribute('stdout', ''); - $execution->setAttribute('stderr', ''); + $execution->setAttribute('logs', ''); + $execution->setAttribute('errors', ''); } + $headers = []; + foreach (($executionResponse['headers'] ?? []) as $key => $value) { + $headers[] = ['name' => $key, 'value' => $value]; + } + + $execution->setAttribute('responseBody', $executionResponse['body'] ?? ''); + $execution->setAttribute('responseHeaders', $headers); + $response ->setStatusCode(Response::STATUS_CODE_CREATED) ->dynamic($execution, Response::MODEL_EXECUTION); @@ -1192,13 +1778,13 @@ App::get('/v1/functions/:functionId/executions') ->inject('dbForProject') ->inject('mode') ->action(function (string $functionId, array $queries, string $search, Response $response, Database $dbForProject, string $mode) { - $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); - if ($function->isEmpty() || !$function->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::FUNCTION_NOT_FOUND); - } + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($function->isEmpty() || (!$function->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); } $queries = Query::parseQueries($queries); @@ -1211,7 +1797,9 @@ App::get('/v1/functions/:functionId/executions') $queries[] = Query::equal('functionId', [$function->getId()]); // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -1235,8 +1823,8 @@ App::get('/v1/functions/:functionId/executions') $isAppUser = Auth::isAppUser($roles); if (!$isPrivilegedUser && !$isAppUser) { $results = array_map(function ($execution) { - $execution->setAttribute('stdout', ''); - $execution->setAttribute('stderr', ''); + $execution->setAttribute('logs', ''); + $execution->setAttribute('errors', ''); return $execution; }, $results); } @@ -1264,13 +1852,13 @@ App::get('/v1/functions/:functionId/executions/:executionId') ->inject('dbForProject') ->inject('mode') ->action(function (string $functionId, string $executionId, Response $response, Database $dbForProject, string $mode) { - $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); - if ($function->isEmpty() || !$function->getAttribute('enabled')) { - if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { - throw new Exception(Exception::FUNCTION_NOT_FOUND); - } + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($function->isEmpty() || (!$function->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); } $execution = $dbForProject->getDocument('executions', $executionId); @@ -1287,8 +1875,8 @@ App::get('/v1/functions/:functionId/executions/:executionId') $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); if (!$isPrivilegedUser && !$isAppUser) { - $execution->setAttribute('stdout', ''); - $execution->setAttribute('stderr', ''); + $execution->setAttribute('logs', ''); + $execution->setAttribute('errors', ''); } $response->dynamic($execution, Response::MODEL_EXECUTION); @@ -1312,10 +1900,11 @@ App::post('/v1/functions/:functionId/variables') ->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) + ->inject('project') ->inject('response') ->inject('dbForProject') ->inject('dbForConsole') - ->action(function (string $functionId, string $key, string $value, Response $response, Database $dbForProject, Database $dbForConsole) { + ->action(function (string $functionId, string $key, string $value, Document $project, Response $response, Database $dbForProject, Database $dbForConsole) { $function = $dbForProject->getDocument('functions', $functionId); if ($function->isEmpty()) { @@ -1331,11 +1920,12 @@ App::post('/v1/functions/:functionId/variables') Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'functionInternalId' => $function->getInternalId(), - 'functionId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), + 'resourceId' => $function->getId(), + 'resourceType' => 'function', 'key' => $key, 'value' => $value, - 'search' => implode(' ', [$variableId, $function->getId(), $key]), + 'search' => implode(' ', [$variableId, $function->getId(), $key, 'function']), ]); try { @@ -1343,7 +1933,11 @@ App::post('/v1/functions/:functionId/variables') } catch (DuplicateException $th) { throw new Exception(Exception::VARIABLE_ALREADY_EXISTS); } + $dbForConsole->deleteCachedDocument('projects', $project->getId()); + $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('live', false)); + + // Inform scheduler to pull the latest changes $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); $schedule ->setAttribute('resourceUpdatedAt', DateTime::now()) @@ -1353,13 +1947,6 @@ App::post('/v1/functions/:functionId/variables') $dbForProject->deleteCachedDocument('functions', $function->getId()); - $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); - $schedule - ->setAttribute('resourceUpdatedAt', DateTime::now()) - ->setAttribute('schedule', $function->getAttribute('schedule')) - ->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment'))); - Authorization::skip(fn () => $dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule)); - $response ->setStatusCode(Response::STATUS_CODE_CREATED) ->dynamic($variable, Response::MODEL_VARIABLE); @@ -1414,10 +2001,15 @@ App::get('/v1/functions/:functionId/variables/:variableId') throw new Exception(Exception::FUNCTION_NOT_FOUND); } - $variable = $dbForProject->findOne('variables', [ - Query::equal('$id', [$variableId]), - Query::equal('functionInternalId', [$function->getInternalId()]), - ]); + $variable = $dbForProject->getDocument('variables', $variableId); + if ( + $variable === false || + $variable->isEmpty() || + $variable->getAttribute('resourceInternalId') !== $function->getInternalId() || + $variable->getAttribute('resourceType') !== 'function' + ) { + throw new Exception(Exception::VARIABLE_NOT_FOUND); + } if ($variable === false || $variable->isEmpty()) { throw new Exception(Exception::VARIABLE_NOT_FOUND); @@ -1443,10 +2035,11 @@ App::put('/v1/functions/:functionId/variables/:variableId') ->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) + ->inject('project') ->inject('response') ->inject('dbForProject') ->inject('dbForConsole') - ->action(function (string $functionId, string $variableId, string $key, ?string $value, Response $response, Database $dbForProject, Database $dbForConsole) { + ->action(function (string $functionId, string $variableId, string $key, ?string $value, Document $project, Response $response, Database $dbForProject, Database $dbForConsole) { $function = $dbForProject->getDocument('functions', $functionId); @@ -1454,10 +2047,10 @@ App::put('/v1/functions/:functionId/variables/:variableId') throw new Exception(Exception::FUNCTION_NOT_FOUND); } - $variable = $dbForProject->findOne('variables', [ - Query::equal('$id', [$variableId]), - Query::equal('functionInternalId', [$function->getInternalId()]), - ]); + $variable = $dbForProject->getDocument('variables', $variableId); + if ($variable === false || $variable->isEmpty() || $variable->getAttribute('resourceInternalId') !== $function->getInternalId() || $variable->getAttribute('resourceType') !== 'function') { + throw new Exception(Exception::VARIABLE_NOT_FOUND); + } if ($variable === false || $variable->isEmpty()) { throw new Exception(Exception::VARIABLE_NOT_FOUND); @@ -1466,15 +2059,18 @@ App::put('/v1/functions/:functionId/variables/:variableId') $variable ->setAttribute('key', $key) ->setAttribute('value', $value ?? $variable->getAttribute('value')) - ->setAttribute('search', implode(' ', [$variableId, $function->getId(), $key])) - ; + ->setAttribute('search', implode(' ', [$variableId, $function->getId(), $key, 'function'])); try { $dbForProject->updateDocument('variables', $variable->getId(), $variable); } catch (DuplicateException $th) { throw new Exception(Exception::VARIABLE_ALREADY_EXISTS); } + $dbForConsole->deleteCachedDocument('projects', $project->getId()); + $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('live', false)); + + // Inform scheduler to pull the latest changes $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); $schedule ->setAttribute('resourceUpdatedAt', DateTime::now()) @@ -1484,13 +2080,6 @@ App::put('/v1/functions/:functionId/variables/:variableId') $dbForProject->deleteCachedDocument('functions', $function->getId()); - $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); - $schedule - ->setAttribute('resourceUpdatedAt', DateTime::now()) - ->setAttribute('schedule', $function->getAttribute('schedule')) - ->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment'))); - Authorization::skip(fn () => $dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule)); - $response->dynamic($variable, Response::MODEL_VARIABLE); }); @@ -1508,20 +2097,21 @@ App::delete('/v1/functions/:functionId/variables/:variableId') ->label('sdk.response.model', Response::MODEL_NONE) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('variableId', '', new UID(), 'Variable unique ID.', false) + ->inject('project') ->inject('response') ->inject('dbForProject') ->inject('dbForConsole') - ->action(function (string $functionId, string $variableId, Response $response, Database $dbForProject, Database $dbForConsole) { + ->action(function (string $functionId, string $variableId, Document $project, Response $response, Database $dbForProject, Database $dbForConsole) { $function = $dbForProject->getDocument('functions', $functionId); if ($function->isEmpty()) { throw new Exception(Exception::FUNCTION_NOT_FOUND); } - $variable = $dbForProject->findOne('variables', [ - Query::equal('$id', [$variableId]), - Query::equal('functionInternalId', [$function->getInternalId()]), - ]); + $variable = $dbForProject->getDocument('variables', $variableId); + if ($variable === false || $variable->isEmpty() || $variable->getAttribute('resourceInternalId') !== $function->getInternalId() || $variable->getAttribute('resourceType') !== 'function') { + throw new Exception(Exception::VARIABLE_NOT_FOUND); + } if ($variable === false || $variable->isEmpty()) { throw new Exception(Exception::VARIABLE_NOT_FOUND); @@ -1529,6 +2119,9 @@ App::delete('/v1/functions/:functionId/variables/:variableId') $dbForProject->deleteDocument('variables', $variable->getId()); + $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('live', false)); + + // Inform scheduler to pull the latest changes $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); $schedule ->setAttribute('resourceUpdatedAt', DateTime::now()) @@ -1538,12 +2131,5 @@ App::delete('/v1/functions/:functionId/variables/:variableId') $dbForProject->deleteCachedDocument('functions', $function->getId()); - $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); - $schedule - ->setAttribute('resourceUpdatedAt', DateTime::now()) - ->setAttribute('schedule', $function->getAttribute('schedule')) - ->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment'))); - Authorization::skip(fn () => $dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule)); - $response->noContent(); }); diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php new file mode 100644 index 0000000000..83888fff2c --- /dev/null +++ b/app/controllers/api/migrations.php @@ -0,0 +1,992 @@ +groups(['api', 'migrations']) + ->desc('Migrate Appwrite 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', '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) + ->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") + ->param('apiKey', '', new Text(512), "Source's API Key") + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->inject('user') + ->inject('events') + ->action(function (array $resources, string $endpoint, string $projectId, string $apiKey, Response $response, Database $dbForProject, Document $project, Document $user, Event $events) { + $migration = $dbForProject->createDocument('migrations', new Document([ + '$id' => ID::unique(), + 'status' => 'pending', + 'stage' => 'init', + 'source' => Appwrite::getName(), + 'credentials' => [ + 'endpoint' => $endpoint, + 'projectId' => $projectId, + 'apiKey' => $apiKey, + ], + 'resources' => $resources, + 'statusCounters' => '{}', + 'resourceData' => '{}', + 'errors' => [], + ])); + + $events->setParam('migrationId', $migration->getId()); + + // Trigger Transfer + $event = new Migration(); + $event + ->setMigration($migration) + ->setProject($project) + ->setUser($user) + ->trigger(); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($migration, Response::MODEL_MIGRATION); + }); + +App::post('/v1/migrations/firebase/oauth') + ->groups(['api', 'migrations']) + ->desc('Migrate Firebase Data (OAuth)') + ->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', 'createFirebaseOAuthMigration') + ->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) + ->param('resources', [], new ArrayList(new WhiteList(Firebase::getSupportedResources())), 'List of resources to migrate') + ->param('projectId', '', new Text(65536), 'Project ID of the Firebase Project') + ->inject('response') + ->inject('dbForProject') + ->inject('dbForConsole') + ->inject('project') + ->inject('user') + ->inject('events') + ->inject('request') + ->action(function (array $resources, string $projectId, Response $response, Database $dbForProject, Database $dbForConsole, Document $project, Document $user, Event $events, Request $request) { + $firebase = new OAuth2Firebase( + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', ''), + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', ''), + $request->getProtocol() . '://' . $request->getHostname() . '/v1/migrations/firebase/redirect' + ); + + $identity = $dbForConsole->findOne('identities', [ + Query::equal('provider', ['firebase']), + Query::equal('userInternalId', [$user->getInternalId()]), + ]); + if ($identity === false || $identity->isEmpty()) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $accessToken = $identity->getAttribute('providerAccessToken'); + $refreshToken = $identity->getAttribute('providerRefreshToken'); + $accessTokenExpiry = $identity->getAttribute('providerAccessTokenExpiry'); + + $isExpired = new \DateTime($accessTokenExpiry) < new \DateTime('now'); + if ($isExpired) { + $firebase->refreshTokens($refreshToken); + + $accessToken = $firebase->getAccessToken(''); + $refreshToken = $firebase->getRefreshToken(''); + + $verificationId = $firebase->getUserID($accessToken); + + if (empty($verificationId)) { + throw new Exception(Exception::GENERAL_RATE_LIMIT_EXCEEDED, 'Another request is currently refreshing OAuth token. Please try again.'); + } + + $identity = $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$firebase->getAccessTokenExpiry(''))); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } + + if ($identity->getAttribute('secrets')) { + $serviceAccount = $identity->getAttribute('secrets'); + } else { + $firebase->cleanupServiceAccounts($accessToken, $projectId); + $serviceAccount = $firebase->createServiceAccount($accessToken, $projectId); + $identity = $identity + ->setAttribute('secrets', json_encode($serviceAccount)); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } + + $migration = $dbForProject->createDocument('migrations', new Document([ + '$id' => ID::unique(), + 'status' => 'pending', + 'stage' => 'init', + 'source' => Firebase::getName(), + 'credentials' => [ + 'serviceAccount' => json_encode($serviceAccount), + ], + 'resources' => $resources, + 'statusCounters' => '{}', + 'resourceData' => '{}', + 'errors' => [] + ])); + + $events->setParam('migrationId', $migration->getId()); + + // Trigger Transfer + $event = new Migration(); + $event + ->setMigration($migration) + ->setProject($project) + ->setUser($user) + ->trigger(); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($migration, Response::MODEL_MIGRATION); + }); + +App::post('/v1/migrations/firebase') + ->groups(['api', 'migrations']) + ->desc('Migrate Firebase Data (Service Account)') + ->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) + ->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') + ->inject('dbForProject') + ->inject('project') + ->inject('user') + ->inject('events') + ->action(function (array $resources, string $serviceAccount, Response $response, Database $dbForProject, Document $project, Document $user, Event $events) { + $migration = $dbForProject->createDocument('migrations', new Document([ + '$id' => ID::unique(), + 'status' => 'pending', + 'stage' => 'init', + 'source' => Firebase::getName(), + 'credentials' => [ + 'serviceAccount' => $serviceAccount, + ], + 'resources' => $resources, + 'statusCounters' => '{}', + 'resourceData' => '{}', + 'errors' => [], + ])); + + $events->setParam('migrationId', $migration->getId()); + + // Trigger Transfer + $event = new Migration(); + $event + ->setMigration($migration) + ->setProject($project) + ->setUser($user) + ->trigger(); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($migration, Response::MODEL_MIGRATION); + }); + +App::post('/v1/migrations/supabase') + ->groups(['api', 'migrations']) + ->desc('Migrate Supabase 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', '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) + ->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') + ->param('databaseHost', '', new Text(512), 'Source\'s Database Host') + ->param('username', '', new Text(512), 'Source\'s Database Username') + ->param('password', '', new Text(512), 'Source\'s Database Password') + ->param('port', 5432, new Integer(true), 'Source\'s Database Port', true) + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->inject('user') + ->inject('events') + ->action(function (array $resources, string $endpoint, string $apiKey, string $databaseHost, string $username, string $password, int $port, Response $response, Database $dbForProject, Document $project, Document $user, Event $events) { + $migration = $dbForProject->createDocument('migrations', new Document([ + '$id' => ID::unique(), + 'status' => 'pending', + 'stage' => 'init', + 'source' => Supabase::getName(), + 'credentials' => [ + 'endpoint' => $endpoint, + 'apiKey' => $apiKey, + 'databaseHost' => $databaseHost, + 'username' => $username, + 'password' => $password, + 'port' => $port, + ], + 'resources' => $resources, + 'statusCounters' => '{}', + 'resourceData' => '{}', + 'errors' => [], + ])); + + $events->setParam('migrationId', $migration->getId()); + + // Trigger Transfer + $event = new Migration(); + $event + ->setMigration($migration) + ->setProject($project) + ->setUser($user) + ->trigger(); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($migration, Response::MODEL_MIGRATION); + }); + +App::post('/v1/migrations/nhost') + ->groups(['api', 'migrations']) + ->desc('Migrate NHost 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', '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) + ->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') + ->param('adminSecret', '', new Text(512), 'Source\'s Admin Secret') + ->param('database', '', new Text(512), 'Source\'s Database Name') + ->param('username', '', new Text(512), 'Source\'s Database Username') + ->param('password', '', new Text(512), 'Source\'s Database Password') + ->param('port', 5432, new Integer(true), 'Source\'s Database Port', true) + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->inject('user') + ->inject('events') + ->action(function (array $resources, string $subdomain, string $region, string $adminSecret, string $database, string $username, string $password, int $port, Response $response, Database $dbForProject, Document $project, Document $user, Event $events) { + $migration = $dbForProject->createDocument('migrations', new Document([ + '$id' => ID::unique(), + 'status' => 'pending', + 'stage' => 'init', + 'source' => NHost::getName(), + 'credentials' => [ + 'subdomain' => $subdomain, + 'region' => $region, + 'adminSecret' => $adminSecret, + 'database' => $database, + 'username' => $username, + 'password' => $password, + 'port' => $port, + ], + 'resources' => $resources, + 'statusCounters' => '{}', + 'resourceData' => '{}', + 'errors' => [], + ])); + + $events->setParam('migrationId', $migration->getId()); + + // Trigger Transfer + $event = new Migration(); + $event + ->setMigration($migration) + ->setProject($project) + ->setUser($user) + ->trigger(); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($migration, Response::MODEL_MIGRATION); + }); + +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) + ->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') + ->inject('dbForProject') + ->action(function (array $queries, string $search, Response $response, Database $dbForProject) { + $queries = Query::parseQueries($queries); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + // Get cursor document if there was a cursor query + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); + $cursor = reset($cursor); + if ($cursor) { + /** @var Query $cursor */ + $migrationId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('migrations', $migrationId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Migration '{$migrationId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + $response->dynamic(new Document([ + 'migrations' => $dbForProject->find('migrations', $queries), + 'total' => $dbForProject->count('migrations', $filterQueries, APP_LIMIT_COUNT), + ]), Response::MODEL_MIGRATION_LIST); + }); + +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) + ->param('migrationId', '', new UID(), 'Migration unique ID.') + ->inject('response') + ->inject('dbForProject') + ->action(function (string $migrationId, Response $response, Database $dbForProject) { + $migration = $dbForProject->getDocument('migrations', $migrationId); + + if ($migration->isEmpty()) { + throw new Exception(Exception::MIGRATION_NOT_FOUND); + } + + $response->dynamic($migration, Response::MODEL_MIGRATION); + }); + +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) + ->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") + ->param('key', '', new Text(512), "Source's API Key") + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->inject('user') + ->action(function (array $resources, string $endpoint, string $projectID, string $key, Response $response) { + try { + $appwrite = new Appwrite($projectID, $endpoint, $key); + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->dynamic(new Document($appwrite->report($resources)), Response::MODEL_MIGRATION_REPORT); + } catch (\Throwable $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Source Error: ' . $e->getMessage()); + } + }); + +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) + ->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') + ->action(function (array $resources, string $serviceAccount, Response $response) { + try { + $firebase = new Firebase(json_decode($serviceAccount, true)); + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->dynamic(new Document($firebase->report($resources)), Response::MODEL_MIGRATION_REPORT); + } catch (\Exception $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Source Error: ' . $e->getMessage()); + } + }); + +App::get('/v1/migrations/firebase/report/oauth') + ->groups(['api', 'migrations']) + ->desc('Generate a report on Firebase Data using OAuth') + ->label('scope', 'migrations.write') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'migrations') + ->label('sdk.method', 'getFirebaseReportOAuth') + ->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) + ->param('resources', [], new ArrayList(new WhiteList(Firebase::getSupportedResources())), 'List of resources to migrate') + ->param('projectId', '', new Text(65536), 'Project ID') + ->inject('response') + ->inject('request') + ->inject('user') + ->inject('dbForConsole') + ->action(function (array $resources, string $projectId, Response $response, Request $request, Document $user, Database $dbForConsole) { + $firebase = new OAuth2Firebase( + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', ''), + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', ''), + $request->getProtocol() . '://' . $request->getHostname() . '/v1/migrations/firebase/redirect' + ); + + $identity = $dbForConsole->findOne('identities', [ + Query::equal('provider', ['firebase']), + Query::equal('userInternalId', [$user->getInternalId()]), + ]); + + if ($identity === false || $identity->isEmpty()) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $accessToken = $identity->getAttribute('providerAccessToken'); + $refreshToken = $identity->getAttribute('providerRefreshToken'); + $accessTokenExpiry = $identity->getAttribute('providerAccessTokenExpiry'); + + if (empty($accessToken) || empty($refreshToken) || empty($accessTokenExpiry)) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + if (App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', '') === '' || App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', '') === '') { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $isExpired = new \DateTime($accessTokenExpiry) < new \DateTime('now'); + if ($isExpired) { + $firebase->refreshTokens($refreshToken); + + $accessToken = $firebase->getAccessToken(''); + $refreshToken = $firebase->getRefreshToken(''); + + $verificationId = $firebase->getUserID($accessToken); + + if (empty($verificationId)) { + throw new Exception(Exception::GENERAL_RATE_LIMIT_EXCEEDED, 'Another request is currently refreshing OAuth token. Please try again.'); + } + + $identity = $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$firebase->getAccessTokenExpiry(''))); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } + + // Get Service Account + if ($identity->getAttribute('secrets')) { + $serviceAccount = $identity->getAttribute('secrets'); + } else { + $firebase->cleanupServiceAccounts($accessToken, $projectId); + $serviceAccount = $firebase->createServiceAccount($accessToken, $projectId); + $identity = $identity + ->setAttribute('secrets', json_encode($serviceAccount)); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } + + $firebase = new Firebase($serviceAccount); + + try { + $report = $firebase->report($resources); + } catch (\Exception $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Source Error: ' . $e->getMessage()); + } + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->dynamic(new Document($report), Response::MODEL_MIGRATION_REPORT); + }); + +App::get('/v1/migrations/firebase/connect') + ->desc('Authorize with firebase') + ->groups(['api', 'migrations']) + ->label('scope', 'migrations.write') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'migrations') + ->label('sdk.method', 'createFirebaseAuth') + ->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) + ->param('redirect', '', fn ($clients) => new Host($clients), 'URL to redirect back to your Firebase authorization. Only console hostnames are allowed.', true, ['clients']) + ->param('projectId', '', new UID(), 'Project ID') + ->inject('response') + ->inject('request') + ->inject('user') + ->inject('dbForConsole') + ->action(function (string $redirect, string $projectId, Response $response, Request $request, Document $user, Database $dbForConsole) { + $state = \json_encode([ + 'projectId' => $projectId, + 'redirect' => $redirect, + ]); + + $prefs = $user->getAttribute('prefs', []); + $prefs['migrationState'] = $state; + $user->setAttribute('prefs', $prefs); + $dbForConsole->updateDocument('users', $user->getId(), $user); + + $oauth2 = new OAuth2Firebase( + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', ''), + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', ''), + $request->getProtocol() . '://' . $request->getHostname() . '/v1/migrations/firebase/redirect' + ); + $url = $oauth2->getLoginURL(); + + $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($url); + }); + +App::get('/v1/migrations/firebase/redirect') + ->desc('Capture and receive data on Firebase authorization') + ->groups(['api', 'migrations']) + ->label('scope', 'public') + ->label('error', __DIR__ . '/../../views/general/error.phtml') + ->param('code', '', new Text(2048), 'OAuth2 code. This is a temporary code that the will be later exchanged for an access token.', true) + ->inject('user') + ->inject('project') + ->inject('request') + ->inject('response') + ->inject('dbForConsole') + ->action(function (string $code, Document $user, Document $project, Request $request, Response $response, Database $dbForConsole) { + $state = $user['prefs']['migrationState'] ?? '{}'; + $prefs['migrationState'] = ''; + $user->setAttribute('prefs', $prefs); + $dbForConsole->updateDocument('users', $user->getId(), $user); + + if (empty($state)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Installation requests from organisation members for the Appwrite Google App are currently unsupported.'); + } + + $state = \json_decode($state, true); + $redirect = $state['redirect'] ?? ''; + $projectId = $state['projectId'] ?? ''; + + $project = $dbForConsole->getDocument('projects', $projectId); + + if (empty($redirect)) { + $redirect = $request->getProtocol() . '://' . $request->getHostname() . '/console/project-$projectId/settings/migrations'; + } + + if ($project->isEmpty()) { + $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($redirect); + + return; + } + + // OAuth Authroization + if (!empty($code)) { + $oauth2 = new OAuth2Firebase( + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', ''), + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', ''), + $request->getProtocol() . '://' . $request->getHostname() . '/v1/migrations/firebase/redirect' + ); + + $accessToken = $oauth2->getAccessToken($code); + $refreshToken = $oauth2->getRefreshToken($code); + $accessTokenExpiry = $oauth2->getAccessTokenExpiry($code); + $email = $oauth2->getUserEmail($accessToken); + $oauth2ID = $oauth2->getUserID($accessToken); + + if (empty($accessToken)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to get access token.'); + } + + if (empty($refreshToken)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to get refresh token.'); + } + + if (empty($accessTokenExpiry)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to get access token expiry.'); + } + + // Makes sure this email is not already used in another identity + $identity = $dbForConsole->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + + if ($identity !== false && !$identity->isEmpty()) { + if ($identity->getAttribute('userInternalId', '') !== $user->getInternalId()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + } + + if ($identity !== false && !$identity->isEmpty()) { + $identity = $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry)); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } else { + $identity = $dbForConsole->createDocument('identities', new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::user($user->getId())), + Permission::delete(Role::user($user->getId())), + ], + 'userInternalId' => $user->getInternalId(), + 'userId' => $user->getId(), + 'provider' => 'firebase', + 'providerUid' => $oauth2ID, + 'providerEmail' => $email, + 'providerAccessToken' => $accessToken, + 'providerRefreshToken' => $refreshToken, + 'providerAccessTokenExpiry' => DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry), + ])); + } + } else { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Missing OAuth2 code.'); + } + + $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($redirect); + }); + +App::get('/v1/migrations/firebase/projects') + ->desc('List Firebase Projects') + ->groups(['api', 'migrations']) + ->label('scope', 'migrations.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'migrations') + ->label('sdk.method', 'listFirebaseProjects') + ->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_MIGRATION_FIREBASE_PROJECT_LIST) + ->inject('user') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->inject('request') + ->action(function (Document $user, Response $response, Document $project, Database $dbForConsole, Request $request) { + $firebase = new OAuth2Firebase( + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', ''), + App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', ''), + $request->getProtocol() . '://' . $request->getHostname() . '/v1/migrations/firebase/redirect' + ); + + $identity = $dbForConsole->findOne('identities', [ + Query::equal('provider', ['firebase']), + Query::equal('userInternalId', [$user->getInternalId()]), + ]); + + if ($identity === false || $identity->isEmpty()) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $accessToken = $identity->getAttribute('providerAccessToken'); + $refreshToken = $identity->getAttribute('providerRefreshToken'); + $accessTokenExpiry = $identity->getAttribute('providerAccessTokenExpiry'); + + if (empty($accessToken) || empty($refreshToken) || empty($accessTokenExpiry)) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + if (App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_ID', '') === '' || App::getEnv('_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET', '') === '') { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + try { + $isExpired = new \DateTime($accessTokenExpiry) < new \DateTime('now'); + if ($isExpired) { + try { + $firebase->refreshTokens($refreshToken); + } catch (\Exception $e) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $accessToken = $firebase->getAccessToken(''); + $refreshToken = $firebase->getRefreshToken(''); + + $verificationId = $firebase->getUserID($accessToken); + + if (empty($verificationId)) { + throw new Exception(Exception::GENERAL_RATE_LIMIT_EXCEEDED, 'Another request is currently refreshing OAuth token. Please try again.'); + } + + $identity = $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$firebase->getAccessTokenExpiry(''))); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } + + $projects = $firebase->getProjects($accessToken); + + $output = []; + foreach ($projects as $project) { + $output[] = [ + 'displayName' => $project['displayName'], + 'projectId' => $project['projectId'], + ]; + } + } catch (\Exception $e) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $response->dynamic(new Document([ + 'projects' => $output, + 'total' => count($output), + ]), Response::MODEL_MIGRATION_FIREBASE_PROJECT_LIST); + }); + +App::get('/v1/migrations/firebase/deauthorize') + ->desc('Revoke Appwrite\'s authorization to access Firebase Projects') + ->groups(['api', 'migrations']) + ->label('scope', 'migrations.write') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'migrations') + ->label('sdk.method', 'deleteFirebaseAuth') + ->label('sdk.description', '') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->inject('user') + ->inject('response') + ->inject('dbForConsole') + ->action(function (Document $user, Response $response, Database $dbForConsole) { + $identity = $dbForConsole->findOne('identities', [ + Query::equal('provider', ['firebase']), + Query::equal('userInternalId', [$user->getInternalId()]), + ]); + + if ($identity === false || $identity->isEmpty()) { + throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, 'Not authenticated with Firebase'); //TODO: Replace with USER_IDENTITY_NOT_FOUND + } + + $dbForConsole->deleteDocument('identities', $identity->getId()); + + $response->noContent(); + }); + +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) + ->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.') + ->param('databaseHost', '', new Text(512), 'Source\'s Database Host.') + ->param('username', '', new Text(512), 'Source\'s Database Username.') + ->param('password', '', new Text(512), 'Source\'s Database Password.') + ->param('port', 5432, new Integer(true), 'Source\'s Database Port.', true) + ->inject('response') + ->inject('dbForProject') + ->action(function (array $resources, string $endpoint, string $apiKey, string $databaseHost, string $username, string $password, int $port, Response $response) { + try { + $supabase = new Supabase($endpoint, $apiKey, $databaseHost, 'postgres', $username, $password, $port); + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->dynamic(new Document($supabase->report($resources)), Response::MODEL_MIGRATION_REPORT); + } catch (\Exception $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Source Error: ' . $e->getMessage()); + } + }); + +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) + ->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.') + ->param('adminSecret', '', new Text(512), 'Source\'s Admin Secret.') + ->param('database', '', new Text(512), 'Source\'s Database Name.') + ->param('username', '', new Text(512), 'Source\'s Database Username.') + ->param('password', '', new Text(512), 'Source\'s Database Password.') + ->param('port', 5432, new Integer(true), 'Source\'s Database Port.', true) + ->inject('response') + ->action(function (array $resources, string $subdomain, string $region, string $adminSecret, string $database, string $username, string $password, int $port, Response $response) { + try { + $nhost = new NHost($subdomain, $region, $adminSecret, $database, $username, $password, $port); + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->dynamic(new Document($nhost->report($resources)), Response::MODEL_MIGRATION_REPORT); + } catch (\Exception $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Source Error: ' . $e->getMessage()); + } + }); + +App::patch('/v1/migrations/:migrationId') + ->groups(['api', 'migrations']) + ->desc('Retry Migration') + ->label('scope', 'migrations.write') + ->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) + ->param('migrationId', '', new UID(), 'Migration unique ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->inject('user') + ->inject('events') + ->action(function (string $migrationId, Response $response, Database $dbForProject, Document $project, Document $user, Event $eventInstance) { + $migration = $dbForProject->getDocument('migrations', $migrationId); + + if ($migration->isEmpty()) { + throw new Exception(Exception::MIGRATION_NOT_FOUND); + } + + if ($migration->getAttribute('status') !== 'failed') { + throw new Exception(Exception::MIGRATION_IN_PROGRESS, 'Migration not failed yet'); + } + + $migration + ->setAttribute('status', 'pending') + ->setAttribute('dateUpdated', \time()); + + // Trigger Migration + $event = new Migration(); + $event + ->setMigration($migration) + ->setProject($project) + ->setUser($user) + ->trigger(); + + $response->noContent(); + }); + +App::delete('/v1/migrations/:migrationId') + ->groups(['api', 'migrations']) + ->desc('Delete Migration') + ->label('scope', 'migrations.write') + ->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/functions/delete-migration.md') + ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) + ->label('sdk.response.model', Response::MODEL_NONE) + ->param('migrationId', '', new UID(), 'Migration ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('events') + ->action(function (string $migrationId, Response $response, Database $dbForProject, Event $events) { + $migration = $dbForProject->getDocument('migrations', $migrationId); + + if ($migration->isEmpty()) { + throw new Exception(Exception::MIGRATION_NOT_FOUND); + } + + if (!$dbForProject->deleteDocument('migrations', $migration->getId())) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove migration from DB'); + } + + $events->setParam('migrationId', $migration->getId()); + + $response->noContent(); + }); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 0f05c6f497..0f0a296185 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -1,18 +1,24 @@ desc('Get usage stats for a project') - ->groups(['api', 'usage']) + ->groups(['api']) ->label('scope', 'projects.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'project') @@ -24,71 +30,282 @@ App::get('/v1/project/usage') ->inject('response') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - METRIC_NETWORK_REQUESTS, - METRIC_NETWORK_INBOUND, - METRIC_NETWORK_OUTBOUND, - METRIC_EXECUTIONS, - METRIC_DOCUMENTS, - METRIC_DATABASES, - METRIC_USERS, - METRIC_BUCKETS, - METRIC_FILES_STORAGE - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; - } - } + $metrics = [ + 'project.$all.network.requests', + 'project.$all.network.bandwidth', + 'project.$all.storage.size', + 'users.$all.count.total', + 'databases.$all.count.total', + 'documents.$all.count.total', + 'executions.$all.compute.total', + 'buckets.$all.count.total' + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'requests' => $stats[$metrics[0]] ?? [], + 'network' => $stats[$metrics[1]] ?? [], + 'storage' => $stats[$metrics[2]] ?? [], + 'users' => $stats[$metrics[3]] ?? [], + 'databases' => $stats[$metrics[4]] ?? [], + 'documents' => $stats[$metrics[5]] ?? [], + 'executions' => $stats[$metrics[6]] ?? [], + 'buckets' => $stats[$metrics[7]] ?? [], + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_PROJECT); + }); + +// Variables + +App::post('/v1/project/variables') + ->desc('Create Variable') + ->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) + ->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') + ->inject('response') + ->inject('dbForProject') + ->inject('dbForConsole') + ->action(function (string $key, string $value, Document $project, Response $response, Database $dbForProject, Database $dbForConsole) { + $variableId = ID::unique(); + + $variable = new Document([ + '$id' => $variableId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'resourceInternalId' => '', + 'resourceId' => '', + 'resourceType' => 'project', + 'key' => $key, + 'value' => $value, + 'search' => implode(' ', [$variableId, $key, 'project']), + ]); + + try { + $variable = $dbForProject->createDocument('variables', $variable); + } catch (DuplicateException $th) { + throw new Exception(Exception::VARIABLE_ALREADY_EXISTS); + } + $dbForConsole->deleteCachedDocument('projects', $project->getId()); + + $functions = $dbForProject->find('functions', [ + Query::limit(APP_LIMIT_SUBQUERY) + ]); + + foreach ($functions as $function) { + $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('live', false)); + } + + $dbForProject->deleteCachedDocument('projects', $project->getId()); + + $response + ->setStatusCode(Response::STATUS_CODE_CREATED) + ->dynamic($variable, Response::MODEL_VARIABLE); + }); + +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) + ->inject('response') + ->inject('dbForProject') + ->action(function (Response $response, Database $dbForProject) { + $variables = $dbForProject->find('variables', [ + Query::equal('resourceType', ['project']), + Query::limit(APP_LIMIT_SUBQUERY) + ]); $response->dynamic(new Document([ - 'range' => $range, - 'requestsTotal' => ($usage[$metrics[0]]), - 'network' => ($usage[$metrics[1]] + $usage[$metrics[2]]), - 'executionsTotal' => $usage[$metrics[3]], - 'documentsTotal' => $usage[$metrics[4]], - 'databasesTotal' => $usage[$metrics[5]], - 'usersTotal' => $usage[$metrics[6]], - 'bucketsTotal' => $usage[$metrics[7]], - 'filesStorage' => $usage[$metrics[8]], - ]), Response::MODEL_USAGE_PROJECT); + 'variables' => $variables, + 'total' => \count($variables), + ]), Response::MODEL_VARIABLE_LIST); + }); + +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) + ->param('variableId', '', new UID(), 'Variable unique ID.', false) + ->inject('response') + ->inject('project') + ->inject('dbForProject') + ->action(function (string $variableId, Response $response, Document $project, Database $dbForProject) { + $variable = $dbForProject->getDocument('variables', $variableId); + if ($variable === false || $variable->isEmpty() || $variable->getAttribute('resourceType') !== 'project') { + throw new Exception(Exception::VARIABLE_NOT_FOUND); + } + + $response->dynamic($variable, Response::MODEL_VARIABLE); + }); + +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) + ->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) + ->inject('project') + ->inject('response') + ->inject('dbForProject') + ->inject('dbForConsole') + ->action(function (string $variableId, string $key, ?string $value, Document $project, Response $response, Database $dbForProject, Database $dbForConsole) { + $variable = $dbForProject->getDocument('variables', $variableId); + if ($variable === false || $variable->isEmpty() || $variable->getAttribute('resourceType') !== 'project') { + throw new Exception(Exception::VARIABLE_NOT_FOUND); + } + + $variable + ->setAttribute('key', $key) + ->setAttribute('value', $value ?? $variable->getAttribute('value')) + ->setAttribute('search', implode(' ', [$variableId, $key, 'project'])); + + try { + $dbForProject->updateDocument('variables', $variable->getId(), $variable); + } catch (DuplicateException $th) { + throw new Exception(Exception::VARIABLE_ALREADY_EXISTS); + } + $dbForConsole->deleteCachedDocument('projects', $project->getId()); + + $functions = $dbForProject->find('functions', [ + Query::limit(APP_LIMIT_SUBQUERY) + ]); + + foreach ($functions as $function) { + $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('live', false)); + } + + $dbForProject->deleteCachedDocument('projects', $project->getId()); + + $response->dynamic($variable, Response::MODEL_VARIABLE); + }); + +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) + ->param('variableId', '', new UID(), 'Variable unique ID.', false) + ->inject('project') + ->inject('response') + ->inject('dbForProject') + ->action(function (string $variableId, Document $project, Response $response, Database $dbForProject) { + $variable = $dbForProject->getDocument('variables', $variableId); + if ($variable === false || $variable->isEmpty() || $variable->getAttribute('resourceType') !== 'project') { + throw new Exception(Exception::VARIABLE_NOT_FOUND); + } + + $functions = $dbForProject->find('functions', [ + Query::limit(APP_LIMIT_SUBQUERY) + ]); + + foreach ($functions as $function) { + $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('live', false)); + } + + $dbForProject->deleteDocument('variables', $variable->getId()); + $dbForProject->deleteCachedDocument('projects', $project->getId()); + + $response->noContent(); }); diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index aa70e389d9..11a9f8c558 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1,19 +1,20 @@ groups(['projects']) @@ -64,7 +61,7 @@ App::post('/v1/projects') ->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.') - ->param('region', App::getEnv('_APP_REGION', 'default'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn($config) => !$config['disabled']))), 'Project Region.', true) + ->param('region', App::getEnv('_APP_REGION', 'default'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn ($config) => !$config['disabled']))), 'Project Region.', true) ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) ->param('logo', '', new Text(1024), 'Project logo.', true) ->param('url', '', new URL(), 'Project URL.', true) @@ -99,6 +96,7 @@ App::post('/v1/projects') $backups['database_db_fra1_03'] = ['from' => '10:30', 'to' => '11:15']; $backups['database_db_fra1_04'] = ['from' => '13:30', 'to' => '14:15']; $backups['database_db_fra1_05'] = ['from' => '4:30', 'to' => '5:15']; + $backups['database_db_fra1_06'] = ['from' => '16:30', 'to' => '17:15']; $databases = Config::getParam('pools-database', []); @@ -122,7 +120,7 @@ App::post('/v1/projects') } } - if ($index = array_search('database_db_fra1_05', $databases)) { + if ($index = array_search('database_db_fra1_06', $databases)) { $database = $databases[$index]; } else { $database = $databases[array_rand($databases)]; @@ -161,7 +159,6 @@ App::post('/v1/projects') 'authProviders' => [], 'webhooks' => null, 'keys' => null, - 'domains' => null, 'auths' => $auths, 'search' => implode(' ', [$projectId, $name]), 'database' => $database @@ -245,7 +242,9 @@ App::get('/v1/projects') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -291,6 +290,120 @@ App::get('/v1/projects/:projectId') $response->dynamic($project, Response::MODEL_PROJECT); }); +App::get('/v1/projects/:projectId/usage') + ->desc('Get usage stats for a project') + ->groups(['api', 'projects', 'usage']) + ->label('scope', 'projects.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'projects') + ->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) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) + ->inject('response') + ->inject('dbForConsole') + ->inject('dbForProject') + ->inject('register') + ->action(function (string $projectId, string $range, Response $response, Database $dbForConsole, Database $dbForProject, Registry $register) { + + $project = $dbForConsole->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], + ]; + + $dbForProject->setNamespace("_{$project->getInternalId()}"); + + $metrics = [ + 'project.$all.network.requests', + 'project.$all.network.bandwidth', + 'project.$all.storage.size', + 'users.$all.count.total', + 'databases.$all.count.total', + 'documents.$all.count.total', + 'executions.$all.compute.total', + 'buckets.$all.count.total' + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'requests' => $stats[$metrics[0]] ?? [], + 'network' => $stats[$metrics[1]] ?? [], + 'storage' => $stats[$metrics[2]] ?? [], + 'users' => $stats[$metrics[3]] ?? [], + 'databases' => $stats[$metrics[4]] ?? [], + 'documents' => $stats[$metrics[5]] ?? [], + 'executions' => $stats[$metrics[6]] ?? [], + 'buckets' => $stats[$metrics[7]] ?? [], + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_PROJECT); + }); + App::patch('/v1/projects/:projectId') ->desc('Update Project') ->groups(['api', 'projects']) @@ -323,17 +436,17 @@ App::patch('/v1/projects/:projectId') } $project = $dbForConsole->updateDocument('projects', $project->getId(), $project - ->setAttribute('name', $name) - ->setAttribute('description', $description) - ->setAttribute('logo', $logo) - ->setAttribute('url', $url) - ->setAttribute('legalName', $legalName) - ->setAttribute('legalCountry', $legalCountry) - ->setAttribute('legalState', $legalState) - ->setAttribute('legalCity', $legalCity) - ->setAttribute('legalAddress', $legalAddress) - ->setAttribute('legalTaxId', $legalTaxId) - ->setAttribute('search', implode(' ', [$projectId, $name]))); + ->setAttribute('name', $name) + ->setAttribute('description', $description) + ->setAttribute('logo', $logo) + ->setAttribute('url', $url) + ->setAttribute('legalName', $legalName) + ->setAttribute('legalCountry', $legalCountry) + ->setAttribute('legalState', $legalState) + ->setAttribute('legalCity', $legalCity) + ->setAttribute('legalAddress', $legalAddress) + ->setAttribute('legalTaxId', $legalTaxId) + ->setAttribute('search', implode(' ', [$projectId, $name]))); $response->dynamic($project, Response::MODEL_PROJECT); }); @@ -366,14 +479,14 @@ App::patch('/v1/projects/:projectId/team') } $project = $dbForConsole->updateDocument('projects', $project->getId(), $project - ->setAttribute('teamId', $teamId) - ->setAttribute('$permissions', [ - Permission::read(Role::team(ID::custom($teamId))), - Permission::update(Role::team(ID::custom($teamId), 'owner')), - Permission::update(Role::team(ID::custom($teamId), 'developer')), - Permission::delete(Role::team(ID::custom($teamId), 'owner')), - Permission::delete(Role::team(ID::custom($teamId), 'developer')), - ])); + ->setAttribute('teamId', $teamId) + ->setAttribute('$permissions', [ + Permission::read(Role::team(ID::custom($teamId))), + Permission::update(Role::team(ID::custom($teamId), 'owner')), + Permission::update(Role::team(ID::custom($teamId), 'developer')), + Permission::delete(Role::team(ID::custom($teamId), 'owner')), + Permission::delete(Role::team(ID::custom($teamId), 'developer')), + ])); $response->dynamic($project, Response::MODEL_PROJECT); }); @@ -389,7 +502,7 @@ App::patch('/v1/projects/:projectId/service') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.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('service', '', new WhiteList(array_keys(array_filter(Config::getParam('services'), fn ($element) => $element['optional'])), true), 'Service name.') ->param('status', null, new Boolean(), 'Service status.') ->inject('response') ->inject('dbForConsole') @@ -431,7 +544,7 @@ App::patch('/v1/projects/:projectId/service/all') throw new Exception(Exception::PROJECT_NOT_FOUND); } - $allServices = array_keys(array_filter(Config::getParam('services'), fn($element) => $element['optional'])); + $allServices = array_keys(array_filter(Config::getParam('services'), fn ($element) => $element['optional'])); $services = []; foreach ($allServices as $service) { @@ -730,8 +843,7 @@ App::delete('/v1/projects/:projectId') $deletes ->setType(DELETE_TYPE_DOCUMENT) - ->setDocument($project) - ; + ->setDocument($project); if (!$dbForConsole->deleteDocument('projects', $projectId)) { throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove project from DB'); @@ -909,8 +1021,7 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId') ->setAttribute('url', $url) ->setAttribute('security', $security) ->setAttribute('httpUser', $httpUser) - ->setAttribute('httpPass', $httpPass) - ; + ->setAttribute('httpPass', $httpPass); $dbForConsole->updateDocument('webhooks', $webhook->getId(), $webhook); $dbForConsole->deleteCachedDocument('projects', $project->getId()); @@ -1149,8 +1260,7 @@ App::put('/v1/projects/:projectId/keys/:keyId') $key ->setAttribute('name', $name) ->setAttribute('scopes', $scopes) - ->setAttribute('expire', $expire) - ; + ->setAttribute('expire', $expire); $dbForConsole->updateDocument('keys', $key->getId(), $key); @@ -1352,8 +1462,7 @@ App::put('/v1/projects/:projectId/platforms/:platformId') ->setAttribute('name', $name) ->setAttribute('key', $key) ->setAttribute('store', $store) - ->setAttribute('hostname', $hostname) - ; + ->setAttribute('hostname', $hostname); $dbForConsole->updateDocument('platforms', $platform->getId(), $platform); @@ -1399,248 +1508,6 @@ App::delete('/v1/projects/:projectId/platforms/:platformId') $response->noContent(); }); -// Domains - -App::post('/v1/projects/:projectId/domains') - ->desc('Create Domain') - ->groups(['api', 'projects']) - ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'createDomain') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOMAIN) - ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('domain', null, new DomainValidator(), 'Domain name.') - ->inject('response') - ->inject('dbForConsole') - ->action(function (string $projectId, string $domain, Response $response, Database $dbForConsole) { - - $project = $dbForConsole->getDocument('projects', $projectId); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - - if ($domain === App::getEnv('_APP_DOMAIN', '') || $domain === App::getEnv('_APP_DOMAIN_TARGET', '')) { - throw new Exception(Exception::DOMAIN_FORBIDDEN); - } - - $document = $dbForConsole->findOne('domains', [ - Query::equal('domain', [$domain]) - ]); - - if ($document && !$document->isEmpty()) { - throw new Exception(Exception::DOMAIN_ALREADY_EXISTS); - } - - $target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', '')); - - if (!$target->isKnown() || $target->isTest()) { - throw new Exception(Exception::DOMAIN_TARGET_INVALID, 'Unreachable CNAME target (' . $target->get() . '). Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.'); - } - - $domain = new Domain($domain); - - $domain = new Document([ - '$id' => ID::unique(), - '$permissions' => [ - Permission::read(Role::any()), - Permission::update(Role::any()), - Permission::delete(Role::any()), - ], - 'projectInternalId' => $project->getInternalId(), - 'projectId' => $project->getId(), - 'updated' => DateTime::now(), - 'domain' => $domain->get(), - 'tld' => $domain->getSuffix(), - 'registerable' => $domain->getRegisterable(), - 'verification' => false, - 'certificateId' => null, - ]); - - $domain = $dbForConsole->createDocument('domains', $domain); - - $dbForConsole->deleteCachedDocument('projects', $project->getId()); - - $response - ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($domain, Response::MODEL_DOMAIN); - }); - -App::get('/v1/projects/:projectId/domains') - ->desc('List Domains') - ->groups(['api', 'projects']) - ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'listDomains') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOMAIN_LIST) - ->param('projectId', '', new UID(), 'Project unique ID.') - ->inject('response') - ->inject('dbForConsole') - ->action(function (string $projectId, Response $response, Database $dbForConsole) { - - $project = $dbForConsole->getDocument('projects', $projectId); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - - $domains = $dbForConsole->find('domains', [ - Query::equal('projectInternalId', [$project->getInternalId()]), - Query::limit(5000), - ]); - - $response->dynamic(new Document([ - 'domains' => $domains, - 'total' => count($domains), - ]), Response::MODEL_DOMAIN_LIST); - }); - -App::get('/v1/projects/:projectId/domains/:domainId') - ->desc('Get Domain') - ->groups(['api', 'projects']) - ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'getDomain') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOMAIN) - ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('domainId', '', new UID(), 'Domain unique ID.') - ->inject('response') - ->inject('dbForConsole') - ->action(function (string $projectId, string $domainId, Response $response, Database $dbForConsole) { - - $project = $dbForConsole->getDocument('projects', $projectId); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - - $domain = $dbForConsole->findOne('domains', [ - Query::equal('$id', [$domainId]), - Query::equal('projectInternalId', [$project->getInternalId()]), - ]); - - if ($domain === false || $domain->isEmpty()) { - throw new Exception(Exception::DOMAIN_NOT_FOUND); - } - - $response->dynamic($domain, Response::MODEL_DOMAIN); - }); - -App::patch('/v1/projects/:projectId/domains/:domainId/verification') - ->desc('Update Domain Verification Status') - ->groups(['api', 'projects']) - ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateDomainVerification') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOMAIN) - ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('domainId', '', new UID(), 'Domain unique ID.') - ->inject('response') - ->inject('dbForConsole') - ->action(function (string $projectId, string $domainId, Response $response, Database $dbForConsole) { - - $project = $dbForConsole->getDocument('projects', $projectId); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - - $domain = $dbForConsole->findOne('domains', [ - Query::equal('$id', [$domainId]), - Query::equal('projectInternalId', [$project->getInternalId()]), - ]); - - if ($domain === false || $domain->isEmpty()) { - throw new Exception(Exception::DOMAIN_NOT_FOUND); - } - - $target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', '')); - - if (!$target->isKnown() || $target->isTest()) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Unreachable CNAME target (' . $target->get() . '), please use a domain with a public suffix.'); - } - - if ($domain->getAttribute('verification') === true) { - return $response->dynamic($domain, Response::MODEL_DOMAIN); - } - - $validator = new CNAME($target->get()); // Verify Domain with DNS records - - if (!$validator->isValid($domain->getAttribute('domain', ''))) { - throw new Exception(Exception::DOMAIN_VERIFICATION_FAILED); - } - - - $dbForConsole->updateDocument('domains', $domain->getId(), $domain->setAttribute('verification', true)); - $dbForConsole->deleteCachedDocument('projects', $project->getId()); - - // Issue a TLS certificate when domain is verified - $event = new Certificate(); - $event - ->setDomain($domain) - ->trigger(); - - $response->dynamic($domain, Response::MODEL_DOMAIN); - }); - -App::delete('/v1/projects/:projectId/domains/:domainId') - ->desc('Delete Domain') - ->groups(['api', 'projects']) - ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'deleteDomain') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) - ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('domainId', '', new UID(), 'Domain unique ID.') - ->inject('response') - ->inject('dbForConsole') - ->inject('deletes') - ->action(function (string $projectId, string $domainId, Response $response, Database $dbForConsole, Delete $deletes) { - - $project = $dbForConsole->getDocument('projects', $projectId); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - - $domain = $dbForConsole->findOne('domains', [ - Query::equal('$id', [$domainId]), - Query::equal('projectInternalId', [$project->getInternalId()]), - ]); - - if ($domain === false || $domain->isEmpty()) { - throw new Exception(Exception::DOMAIN_NOT_FOUND); - } - - if ($domain->getAttribute('domain') === App::getEnv('_APP_DOMAIN', '') || $domain->getAttribute('domain') === App::getEnv('_APP_DOMAIN_TARGET', '')) { - throw new Exception(Exception::DOMAIN_FORBIDDEN); - } - - $dbForConsole->deleteDocument('domains', $domain->getId()); - - $dbForConsole->deleteCachedDocument('projects', $project->getId()); - - $deletes - ->setType(DELETE_TYPE_CERTIFICATES) - ->setDocument($domain); - - $response->noContent(); - }); - // CUSTOM SMTP and Templates App::patch('/v1/projects/:projectId/smtp') ->desc('Update SMTP configuration') @@ -1654,15 +1521,17 @@ App::patch('/v1/projects/:projectId/smtp') ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('enabled', false, new Boolean(), 'Enable custom SMTP service') - ->param('sender', '', new Email(), 'SMTP sender email') - ->param('host', '', new HostName(), 'SMTP server host name') - ->param('port', null, new Integer(), 'SMTP server port') - ->param('username', null, new Text(0), 'SMTP server username') - ->param('password', null, new Text(0), 'SMTP server password') + ->param('senderName', '', new Text(255, 0), 'Name of the email sender', true) + ->param('senderEmail', '', new Email(), 'Email of the sender', true) + ->param('replyTo', '', new Email(), 'Reply to email', true) + ->param('host', '', new HostName(), 'SMTP server host name', true) + ->param('port', 587, new Integer(), 'SMTP server port', true) + ->param('username', '', new Text(0, 0), 'SMTP server username', true) + ->param('password', '', new Text(0, 0), 'SMTP server password', true) ->param('secure', '', new WhiteList(['tls'], true), 'Does SMTP server use secure connection', true) ->inject('response') ->inject('dbForConsole') - ->action(function (string $projectId, bool $enabled, string $sender, string $host, int $port, string $username, string $password, string $secure, Response $response, Database $dbForConsole) { + ->action(function (string $projectId, bool $enabled, string $senderName, string $senderEmail, string $replyTo, string $host, int $port, string $username, string $password, string $secure, Response $response, Database $dbForConsole) { $project = $dbForConsole->getDocument('projects', $projectId); @@ -1670,30 +1539,60 @@ App::patch('/v1/projects/:projectId/smtp') throw new Exception(Exception::PROJECT_NOT_FOUND); } - // validate SMTP settings - $mail = new PHPMailer(true); - $mail->isSMTP(); - $mail->Username = $username; - $mail->Password = $password; - $mail->Host = $host; - $mail->Port = $port; - $mail->SMTPSecure = $secure; - $mail->SMTPAutoTLS = false; - $valid = $mail->SmtpConnect(); - - if (!$valid) { - throw new Exception(Exception::GENERAL_SMTP_DISABLED); + // Ensure required params for when enabling SMTP + if ($enabled) { + if (empty($senderName)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Sender name is required when enabling SMTP.'); + } elseif (empty($senderEmail)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Sender email is required when enabling SMTP.'); + } elseif (empty($host)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Host is required when enabling SMTP.'); + } elseif (empty($port)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Port is required when enabling SMTP.'); + } } - $smtp = [ - 'enabled' => $enabled, - 'sender' => $sender, - 'host' => $host, - 'port' => $port, - 'username' => $username, - 'password' => $password, - 'secure' => $secure, - ]; + // validate SMTP settings + if ($enabled) { + $mail = new PHPMailer(true); + $mail->isSMTP(); + $mail->Username = $username; + $mail->Password = $password; + $mail->Host = $host; + $mail->Port = $port; + $mail->SMTPSecure = $secure; + $mail->SMTPAutoTLS = false; + $mail->Timeout = 5; + + try { + $valid = $mail->SmtpConnect(); + + if (!$valid) { + throw new Exception('Connection is not valid.'); + } + } catch (Throwable $error) { + throw new Exception(Exception::PROJECT_SMTP_CONFIG_INVALID, 'Could not connect to SMTP server: ' . $error->getMessage()); + } + } + + // Save SMTP settings + if ($enabled) { + $smtp = [ + 'enabled' => $enabled, + 'senderName' => $senderName, + 'senderEmail' => $senderEmail, + 'replyTo' => $replyTo, + 'host' => $host, + 'port' => $port, + 'username' => $username, + 'password' => $password, + 'secure' => $secure, + ]; + } else { + $smtp = [ + 'enabled' => false + ]; + } $project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('smtp', $smtp)); @@ -1712,11 +1611,13 @@ App::get('/v1/projects/:projectId/templates/sms/:type/:locale') ->label('sdk.response.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']) + ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $type, string $locale, Response $response, Database $dbForConsole) { + throw new Exception(Exception::GENERAL_NOT_IMPLEMENTED); + $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { @@ -1728,7 +1629,7 @@ App::get('/v1/projects/:projectId/templates/sms/:type/:locale') if (is_null($template)) { $template = [ - 'message' => Template::fromFile(__DIR__ . '/../../config/locale/templates/sms-base.tpl')->render(), + 'message' => Template::fromFile(__DIR__ . '/../../config/locale/templates/sms-base.tpl')->render(), ]; } @@ -1750,7 +1651,7 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk.response.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']) + ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $type, string $locale, Response $response, Database $dbForConsole) { @@ -1766,27 +1667,22 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') $localeObj = new Locale($locale); if (is_null($template)) { - $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl'); - $message = $message + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message ->setParam('{{hello}}', $localeObj->getText("emails.{$type}.hello")) - ->setParam('{{name}}', '') - ->setParam('{{body}}', $localeObj->getText("emails.{$type}.body")) + ->setParam('{{user}}', '') ->setParam('{{footer}}', $localeObj->getText("emails.{$type}.footer")) + ->setParam('{{body}}', $localeObj->getText('emails.' . $type . '.body')) ->setParam('{{thanks}}', $localeObj->getText("emails.{$type}.thanks")) ->setParam('{{signature}}', $localeObj->getText("emails.{$type}.signature")) - ->setParam('{{direction}}', $localeObj->getText('settings.direction')) - ->setParam('{{bg-body}}', '#f7f7f7') - ->setParam('{{bg-content}}', '#ffffff') - ->setParam('{{text-content}}', '#000000') - ->render(); + ->setParam('{{direction}}', $localeObj->getText('settings.direction')); + $message = $message->render(); - $from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($localeObj->getText('emails.sender'), $project->getAttribute('name')); - $from = empty($from) ? \urldecode(App::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server')) : $from; $template = [ 'message' => $message, 'subject' => $localeObj->getText('emails.' . $type . '.subject'), - 'senderEmail' => App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', ''), - 'senderName' => $from + 'senderEmail' => '', + 'senderName' => '' ]; } @@ -1808,12 +1704,14 @@ App::patch('/v1/projects/:projectId/templates/sms/:type/:locale') ->label('sdk.response.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']) + ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->param('message', '', new Text(0), 'Template message') ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $type, string $locale, string $message, Response $response, Database $dbForConsole) { + throw new Exception(Exception::GENERAL_NOT_IMPLEMENTED); + $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { @@ -1846,15 +1744,15 @@ App::patch('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk.response.model', Response::MODEL_PROJECT) ->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']) - ->param('senderName', '', new Text(255), 'Name of the email sender') - ->param('senderEmail', '', new Email(), 'Email of the sender') + ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->param('subject', '', new Text(255), 'Email Subject') ->param('message', '', new Text(0), 'Template message') + ->param('senderName', '', new Text(255, 0), 'Name of the email sender', true) + ->param('senderEmail', '', new Email(), 'Email of the sender', true) ->param('replyTo', '', new Email(), 'Reply to email', true) ->inject('response') ->inject('dbForConsole') - ->action(function (string $projectId, string $type, string $locale, string $senderName, string $senderEmail, string $subject, string $message, string $replyTo, Response $response, Database $dbForConsole) { + ->action(function (string $projectId, string $type, string $locale, string $subject, string $message, string $senderName, string $senderEmail, string $replyTo, Response $response, Database $dbForConsole) { $project = $dbForConsole->getDocument('projects', $projectId); @@ -1896,11 +1794,13 @@ App::delete('/v1/projects/:projectId/templates/sms/:type/:locale') ->label('sdk.response.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']) + ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $type, string $locale, Response $response, Database $dbForConsole) { + throw new Exception(Exception::GENERAL_NOT_IMPLEMENTED); + $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { @@ -1937,7 +1837,7 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk.response.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']) + ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $type, string $locale, Response $response, Database $dbForConsole) { diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php new file mode 100644 index 0000000000..1c0c929024 --- /dev/null +++ b/app/controllers/api/proxy.php @@ -0,0 +1,316 @@ +groups(['api', 'proxy']) + ->desc('Create Rule') + ->label('scope', 'rules.write') + ->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) + ->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) + ->inject('response') + ->inject('project') + ->inject('events') + ->inject('dbForConsole') + ->inject('dbForProject') + ->action(function (string $domain, string $resourceType, string $resourceId, Response $response, Document $project, Event $events, Database $dbForConsole, Database $dbForProject) { + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + if ($domain === $mainDomain) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your main domain to specific resource. Please use subdomain or a different domain.'); + } + if ($domain === 'localhost' || $domain === APP_HOSTNAME_INTERNAL) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please pick another one.'); + } + + $document = $dbForConsole->findOne('rules', [ + Query::equal('domain', [$domain]), + ]); + + if ($document && !$document->isEmpty()) { + if ($document->getAttribute('projectId') === $project->getId()) { + $resourceType = $document->getAttribute('resourceType'); + $resourceId = $document->getAttribute('resourceId'); + $message = "Domain already assigned to '{$resourceType}' service"; + if (!empty($resourceId)) { + $message .= " with ID '{$resourceId}'"; + } + + $message .= '.'; + } else { + $message = 'Domain already assigned to different project.'; + } + + throw new Exception(Exception::RULE_ALREADY_EXISTS, $message); + } + + $resourceInternalId = ''; + + if ($resourceType == 'function') { + if (empty($resourceId)) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); + } + + $function = $dbForProject->getDocument('functions', $resourceId); + + if ($function->isEmpty()) { + throw new Exception(Exception::RULE_RESOURCE_NOT_FOUND); + } + + $resourceInternalId = $function->getInternalId(); + } + + $domain = new Domain($domain); + + $ruleId = ID::unique(); + $rule = new Document([ + '$id' => $ruleId, + 'projectId' => $project->getId(), + 'projectInternalId' => $project->getInternalId(), + 'domain' => $domain->get(), + 'resourceType' => $resourceType, + 'resourceId' => $resourceId, + 'resourceInternalId' => $resourceInternalId, + 'certificateId' => '', + ]); + + $status = 'created'; + $functionsDomain = App::getEnv('_APP_DOMAIN_FUNCTIONS'); + if (!empty($functionsDomain) && \str_ends_with($domain->get(), $functionsDomain)) { + $status = 'verified'; + } + + if ($status === 'created') { + $target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', '')); + $validator = new CNAME($target->get()); // Verify Domain with DNS records + + if ($validator->isValid($domain->get())) { + $status = 'verifying'; + + $event = new Certificate(); + $event + ->setDomain(new Document([ + 'domain' => $rule->getAttribute('domain') + ])) + ->trigger(); + } + } + + $rule->setAttribute('status', $status); + $rule = $dbForConsole->createDocument('rules', $rule); + + $events->setParam('ruleId', $rule->getId()); + + $rule->setAttribute('logs', ''); + + $response + ->setStatusCode(Response::STATUS_CODE_CREATED) + ->dynamic($rule, Response::MODEL_PROXY_RULE); + }); + +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) + ->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') + ->inject('project') + ->inject('dbForConsole') + ->action(function (array $queries, string $search, Response $response, Document $project, Database $dbForConsole) { + $queries = Query::parseQueries($queries); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + $queries[] = Query::equal('projectInternalId', [$project->getInternalId()]); + + // Get cursor document if there was a cursor query + $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = reset($cursor); + if ($cursor) { + /** @var Query $cursor */ + $ruleId = $cursor->getValue(); + $cursorDocument = $dbForConsole->getDocument('rules', $ruleId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Rule '{$ruleId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + $rules = $dbForConsole->find('rules', $queries); + foreach ($rules as $rule) { + $certificate = $dbForConsole->getDocument('certificates', $rule->getAttribute('certificateId', '')); + $rule->setAttribute('logs', $certificate->getAttribute('logs', '')); + $rule->setAttribute('renewAt', $certificate->getAttribute('renewDate', '')); + } + + $response->dynamic(new Document([ + 'rules' => $rules, + 'total' => $dbForConsole->count('rules', $filterQueries, APP_LIMIT_COUNT), + ]), Response::MODEL_PROXY_RULE_LIST); + }); + +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) + ->param('ruleId', '', new UID(), 'Rule ID.') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $ruleId, Response $response, Document $project, Database $dbForConsole) { + $rule = $dbForConsole->getDocument('rules', $ruleId); + + if ($rule->isEmpty() || $rule->getAttribute('projectInternalId') !== $project->getInternalId()) { + throw new Exception(Exception::RULE_NOT_FOUND); + } + + $certificate = $dbForConsole->getDocument('certificates', $rule->getAttribute('certificateId', '')); + $rule->setAttribute('logs', $certificate->getAttribute('logs', '')); + $rule->setAttribute('renewAt', $certificate->getAttribute('renewDate', '')); + + $response->dynamic($rule, Response::MODEL_PROXY_RULE); + }); + +App::delete('/v1/proxy/rules/:ruleId') + ->groups(['api', 'proxy']) + ->desc('Delete Rule') + ->label('scope', 'rules.write') + ->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) + ->param('ruleId', '', new UID(), 'Rule ID.') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->inject('deletes') + ->inject('events') + ->action(function (string $ruleId, Response $response, Document $project, Database $dbForConsole, Delete $deletes, Event $events) { + $rule = $dbForConsole->getDocument('rules', $ruleId); + + if ($rule->isEmpty() || $rule->getAttribute('projectInternalId') !== $project->getInternalId()) { + throw new Exception(Exception::RULE_NOT_FOUND); + } + + $dbForConsole->deleteDocument('rules', $rule->getId()); + + $deletes + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($rule); + + $events->setParam('ruleId', $rule->getId()); + + $response->noContent(); + }); + +App::patch('/v1/proxy/rules/:ruleId/verification') + ->desc('Update Rule Verification Status') + ->groups(['api', 'proxy']) + ->label('scope', 'rules.write') + ->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) + ->param('ruleId', '', new UID(), 'Rule ID.') + ->inject('response') + ->inject('events') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $ruleId, Response $response, Event $events, Document $project, Database $dbForConsole) { + $rule = $dbForConsole->getDocument('rules', $ruleId); + + if ($rule->isEmpty() || $rule->getAttribute('projectInternalId') !== $project->getInternalId()) { + throw new Exception(Exception::RULE_NOT_FOUND); + } + + $target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', '')); + + if (!$target->isKnown() || $target->isTest()) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Domain target must be configured as environment variable.'); + } + + if ($rule->getAttribute('verification') === true) { + return $response->dynamic($rule, Response::MODEL_PROXY_RULE); + } + + $validator = new CNAME($target->get()); // Verify Domain with DNS records + $domain = new Domain($rule->getAttribute('domain', '')); + + if (!$validator->isValid($domain->get())) { + throw new Exception(Exception::RULE_VERIFICATION_FAILED); + } + + $dbForConsole->updateDocument('rules', $rule->getId(), $rule->setAttribute('status', 'verifying')); + + // Issue a TLS certificate when domain is verified + $event = new Certificate(); + $event + ->setDomain(new Document([ + 'domain' => $rule->getAttribute('domain') + ])) + ->trigger(); + + $events->setParam('ruleId', $rule->getId()); + + $certificate = $dbForConsole->getDocument('certificates', $rule->getAttribute('certificateId', '')); + $rule->setAttribute('logs', $certificate->getAttribute('logs', '')); + + $response->dynamic($rule, Response::MODEL_PROXY_RULE); + }); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index c34515b5e1..8cad0aaf8f 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1,6 +1,7 @@ label('event', 'buckets.[bucketId].create') ->label('audits.event', 'bucket.create') ->label('audits.resource', 'bucket/{response.$id}') + ->label('usage.metric', 'buckets.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'createBucket') @@ -62,8 +64,8 @@ App::post('/v1/storage/buckets') ->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](/docs/permissions).', true) ->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).', true) - ->param('enabled', true, new Boolean(true), 'Is bucket enabled?', true) - ->param('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0), new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](/docs/environment-variables#storage)', true) + ->param('enabled', true, new Boolean(true), '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.', true) + ->param('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0), new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true) ->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true) ->param('compression', COMPRESSION_TYPE_NONE, new WhiteList([COMPRESSION_TYPE_NONE, COMPRESSION_TYPE_GZIP, COMPRESSION_TYPE_ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . COMPRESSION_TYPE_NONE . ', [' . COMPRESSION_TYPE_GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . COMPRESSION_TYPE_ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true) ->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true) @@ -146,6 +148,7 @@ App::get('/v1/storage/buckets') ->desc('List buckets') ->groups(['api', 'storage']) ->label('scope', 'buckets.read') + ->label('usage.metric', 'buckets.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'listBuckets') @@ -166,7 +169,9 @@ App::get('/v1/storage/buckets') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -192,6 +197,7 @@ App::get('/v1/storage/buckets/:bucketId') ->desc('Get Bucket') ->groups(['api', 'storage']) ->label('scope', 'buckets.read') + ->label('usage.metric', 'buckets.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getBucket') @@ -220,6 +226,7 @@ App::put('/v1/storage/buckets/:bucketId') ->label('event', 'buckets.[bucketId].update') ->label('audits.event', 'bucket.update') ->label('audits.resource', 'bucket/{response.$id}') + ->label('usage.metric', 'buckets.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'updateBucket') @@ -231,8 +238,8 @@ App::put('/v1/storage/buckets/:bucketId') ->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](/docs/permissions).', true) ->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).', true) - ->param('enabled', true, new Boolean(true), 'Is bucket enabled?', true) - ->param('maximumFileSize', null, new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human((int)App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](/docs/environment-variables#storage)', true) + ->param('enabled', true, new Boolean(true), '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.', true) + ->param('maximumFileSize', null, new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human((int)App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true) ->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true) ->param('compression', COMPRESSION_TYPE_NONE, new WhiteList([COMPRESSION_TYPE_NONE, COMPRESSION_TYPE_GZIP, COMPRESSION_TYPE_ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . COMPRESSION_TYPE_NONE . ', [' . COMPRESSION_TYPE_GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . COMPRESSION_TYPE_ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true) ->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true) @@ -287,6 +294,7 @@ App::delete('/v1/storage/buckets/:bucketId') ->label('audits.event', 'bucket.delete') ->label('event', 'buckets.[bucketId].delete') ->label('audits.resource', 'bucket/{request.bucketId}') + ->label('usage.metric', 'buckets.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'deleteBucket') @@ -329,6 +337,8 @@ App::post('/v1/storage/buckets/:bucketId/files') ->label('audits.event', 'file.create') ->label('event', 'buckets.[bucketId].files.[fileId].create') ->label('audits.resource', 'file/{response.$id}') + ->label('usage.metric', 'files.{scope}.requests.create') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->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) @@ -354,10 +364,12 @@ App::post('/v1/storage/buckets/:bucketId/files') ->inject('deviceFiles') ->inject('deviceLocal') ->action(function (string $bucketId, string $fileId, mixed $file, ?array $permissions, Request $request, Response $response, Database $dbForProject, Document $user, Event $events, string $mode, Device $deviceFiles, Device $deviceLocal) { - $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -490,13 +502,20 @@ App::post('/v1/storage/buckets/:bucketId/files') $metadata = ['content_type' => $deviceLocal->getFileMimeType($fileTmpName)]; if (!$file->isEmpty()) { $chunks = $file->getAttribute('chunksTotal', 1); + $uploaded = $file->getAttribute('chunksUploaded', 0); $metadata = $file->getAttribute('metadata', []); + if ($chunk === -1) { $chunk = $chunks; } + + if ($uploaded === $chunks) { + throw new Exception(Exception::STORAGE_FILE_ALREADY_EXISTS); + } } $chunksUploaded = $deviceFiles->upload($fileTmpName, $path, $chunk, $chunks, $metadata); + if (empty($chunksUploaded)) { throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed uploading file'); } @@ -669,6 +688,8 @@ App::get('/v1/storage/buckets/:bucketId/files') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) + ->label('usage.metric', 'files.{scope}.requests.read') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'listFiles') ->label('sdk.description', '/docs/references/storage/list-files.md') @@ -682,10 +703,12 @@ App::get('/v1/storage/buckets/:bucketId/files') ->inject('dbForProject') ->inject('mode') ->action(function (string $bucketId, array $queries, string $search, Response $response, Database $dbForProject, string $mode) { - $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -703,7 +726,9 @@ App::get('/v1/storage/buckets/:bucketId/files') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -744,6 +769,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) + ->label('usage.metric', 'files.{scope}.requests.read') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFile') ->label('sdk.description', '/docs/references/storage/get-file.md') @@ -756,10 +783,12 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId') ->inject('dbForProject') ->inject('mode') ->action(function (string $bucketId, string $fileId, Response $response, Database $dbForProject, string $mode) { - $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -791,6 +820,8 @@ 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('usage.metric', 'files.{scope}.requests.read') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFilePreview') @@ -826,7 +857,10 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -952,6 +986,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') ->desc('Get File for Download') ->groups(['api', 'storage']) ->label('scope', 'files.read') + ->label('usage.metric', 'files.{scope}.requests.read') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFileDownload') @@ -970,7 +1006,10 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -1090,6 +1129,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') ->desc('Get File for View') ->groups(['api', 'storage']) ->label('scope', 'files.read') + ->label('usage.metric', 'files.{scope}.requests.read') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFileView') @@ -1105,10 +1146,12 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') ->inject('mode') ->inject('deviceFiles') ->action(function (string $bucketId, string $fileId, Response $response, Request $request, Database $dbForProject, string $mode, Device $deviceFiles) { - $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -1242,6 +1285,8 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') ->label('event', 'buckets.[bucketId].files.[fileId].update') ->label('audits.event', 'file.update') ->label('audits.resource', 'file/{response.$id}') + ->label('usage.metric', 'files.{scope}.requests.update') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->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) @@ -1262,10 +1307,12 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') ->inject('mode') ->inject('events') ->action(function (string $bucketId, string $fileId, ?string $name, ?array $permissions, Response $response, Database $dbForProject, Document $user, string $mode, Event $events) { - $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -1341,13 +1388,14 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') }); App::delete('/v1/storage/buckets/:bucketId/files/:fileId') - ->alias('/v1/storage/files/:fileId', ['bucketId' => 'default']) ->desc('Delete File') ->groups(['api', 'storage']) ->label('scope', 'files.write') ->label('event', 'buckets.[bucketId].files.[fileId].delete') ->label('audits.event', 'file.delete') ->label('audits.resource', 'file/{request.fileId}') + ->label('usage.metric', 'files.{scope}.requests.delete') + ->label('usage.params', ['bucketId:{request.bucketId}']) ->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) @@ -1368,7 +1416,10 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ->action(function (string $bucketId, string $fileId, Response $response, Database $dbForProject, Event $events, string $mode, Device $deviceFiles, Delete $deletes) { $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -1449,62 +1500,103 @@ App::get('/v1/storage/usage') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - METRIC_BUCKETS, - METRIC_FILES, - METRIC_FILES_STORAGE, - ]; + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], + ]; - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; + $metrics = [ + 'project.$all.storage.size', + 'buckets.$all.count.total', + 'buckets.$all.requests.create', + 'buckets.$all.requests.read', + 'buckets.$all.requests.update', + 'buckets.$all.requests.delete', + 'files.$all.storage.size', + 'files.$all.count.total', + 'files.$all.requests.create', + 'files.$all.requests.read', + 'files.$all.requests.update', + 'files.$all.requests.delete', + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); } - } - }); + }); - $format = (match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }); - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } + $usage = new Document([ + 'range' => $range, + 'bucketsCount' => $stats['buckets.$all.count.total'], + 'bucketsCreate' => $stats['buckets.$all.requests.create'], + 'bucketsRead' => $stats['buckets.$all.requests.read'], + 'bucketsUpdate' => $stats['buckets.$all.requests.update'], + 'bucketsDelete' => $stats['buckets.$all.requests.delete'], + 'storage' => $stats['project.$all.storage.size'], + 'filesCount' => $stats['files.$all.count.total'], + 'filesCreate' => $stats['files.$all.requests.create'], + 'filesRead' => $stats['files.$all.requests.read'], + 'filesUpdate' => $stats['files.$all.requests.update'], + 'filesDelete' => $stats['files.$all.requests.delete'], + ]); } - $response->dynamic(new Document([ - 'range' => $range, - 'bucketsTotal' => $usage[$metrics[0]], - 'filesTotal' => $usage[$metrics[1]], - 'filesStorage' => $usage[$metrics[2]], - ]), Response::MODEL_USAGE_STORAGE); + $response->dynamic($usage, Response::MODEL_USAGE_STORAGE); }); App::get('/v1/storage/:bucketId/usage') - ->desc('Get usage stats for storage bucket') + ->desc('Get usage stats for a storage bucket') ->groups(['api', 'storage', 'usage']) ->label('scope', 'files.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) @@ -1525,55 +1617,86 @@ App::get('/v1/storage/:bucketId/usage') throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES), - str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE), - ]; + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], + ]; - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; + $metrics = [ + "files.{$bucketId}.count.total", + "files.{$bucketId}.storage.size", + "files.{$bucketId}.requests.create", + "files.{$bucketId}.requests.read", + "files.{$bucketId}.requests.update", + "files.{$bucketId}.requests.delete", + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); } - } - }); + }); - $format = (match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }); - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } + $usage = new Document([ + 'range' => $range, + 'filesCount' => $stats[$metrics[0]], + 'filesStorage' => $stats[$metrics[1]], + 'filesCreate' => $stats[$metrics[2]], + 'filesRead' => $stats[$metrics[3]], + 'filesUpdate' => $stats[$metrics[4]], + 'filesDelete' => $stats[$metrics[5]], + ]); } - $response->dynamic(new Document([ - 'range' => $range, - 'filesTotal' => $usage[$metrics[0]], - 'filesStorage' => $usage[$metrics[1]], - ]), Response::MODEL_USAGE_BUCKETS); + $response->dynamic($usage, Response::MODEL_USAGE_BUCKETS); }); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 0c5398500d..c5dd3eed12 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -153,7 +153,9 @@ App::get('/v1/teams') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -442,6 +444,14 @@ App::post('/v1/teams/:teamId/memberships') } } + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + try { $userId = ID::unique(); $invitee = Authorization::skip(fn() => $dbForProject->createDocument('users', new Document([ @@ -472,7 +482,8 @@ App::post('/v1/teams/:teamId/memberships') 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]) + 'search' => implode(' ', [$userId, $email, $name]), + 'accessedAt' => DateTime::now(), ]))); } catch (Duplicate $th) { throw new Exception(Exception::USER_ALREADY_EXISTS); @@ -532,44 +543,85 @@ App::post('/v1/teams/:teamId/memberships') if (!empty($email)) { $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); - $from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName); - $body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl'); + $body = $locale->getText("emails.invitation.body"); $subject = \sprintf($locale->getText("emails.invitation.subject"), $team->getAttribute('name'), $projectName); - - $smtpEnabled = $project->getAttribute('smtp', [])['enabled'] ?? false; $customTemplate = $project->getAttribute('templates', [])['email.invitation-' . $locale->default] ?? []; - if ($smtpEnabled && !empty($customTemplate)) { - $body = $customTemplate['message']; - $subject = $customTemplate['subject']; - $from = $customTemplate['senderName']; + + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message->setParam('{{body}}', $body); + $body = $message->render(); + + $smtp = $project->getAttribute('smtp', []); + $smtpEnabled = $smtp['enabled'] ?? false; + + $senderEmail = App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $senderName = App::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']; + } + + $mails + ->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; + } + + $mails + ->setSmtpReplyTo($replyTo) + ->setSmtpSenderEmail($senderEmail) + ->setSmtpSenderName($senderName); } - $body->setParam('{{owner}}', $user->getAttribute('name')); - $body->setParam('{{team}}', $team->getAttribute('name')); - - $body - ->setParam('{{subject}}', $subject) - ->setParam('{{hello}}', $locale->getText("emails.invitation.hello")) - ->setParam('{{name}}', $user->getAttribute('name')) - ->setParam('{{body}}', $locale->getText("emails.invitation.body")) - ->setParam('{{redirect}}', $url) - ->setParam('{{footer}}', $locale->getText("emails.invitation.footer")) - ->setParam('{{thanks}}', $locale->getText("emails.invitation.thanks")) - ->setParam('{{signature}}', $locale->getText("emails.invitation.signature")) - ->setParam('{{project}}', $projectName) - ->setParam('{{direction}}', $locale->getText('settings.direction')) - ->setParam('{{bg-body}}', '#f7f7f7') - ->setParam('{{bg-content}}', '#ffffff') - ->setParam('{{text-content}}', '#000000'); - - $body = $body->render(); + $emailVariables = [ + 'owner' => $user->getAttribute('name'), + 'subject' => $subject, + 'hello' => $locale->getText("emails.invitation.hello"), + 'body' => $body, + 'footer' => $locale->getText("emails.invitation.footer"), + 'thanks' => $locale->getText("emails.invitation.thanks"), + 'signature' => $locale->getText("emails.invitation.signature"), + 'direction' => $locale->getText('settings.direction'), + 'bg-body' => '#f7f7f7', + 'bg-content' => '#ffffff', + 'text-content' => '#000000', + /* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */ + 'user' => $user->getAttribute('name'), + 'team' => $team->getAttribute('name'), + 'project' => $projectName, + 'redirect' => $url + ]; $mails ->setSubject($subject) ->setBody($body) - ->setFrom($from) ->setRecipient($invitee->getAttribute('email')) ->setName($invitee->getAttribute('name')) + ->setVariables($emailVariables) ->trigger() ; } elseif (!empty($phone)) { @@ -641,7 +693,9 @@ App::get('/v1/teams/:teamId/memberships') $queries[] = Query::equal('teamId', [$teamId]); // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -731,7 +785,7 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') }); App::patch('/v1/teams/:teamId/memberships/:membershipId') - ->desc('Update Membership Roles') + ->desc('Update Membership') ->groups(['api', 'teams']) ->label('event', 'teams.[teamId].memberships.[membershipId].update') ->label('scope', 'teams.write') @@ -739,8 +793,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->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', 'updateMembershipRoles') - ->label('sdk.description', '/docs/references/teams/update-team-membership-roles.md') + ->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) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index c3129d41eb..c6d9b2d4e3 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -8,6 +8,7 @@ use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Network\Validator\Email; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Queries\Identities; use Utopia\Database\Validator\Queries; use Appwrite\Utopia\Database\Validator\Queries\Users; use Utopia\Database\Validator\Query\Limit; @@ -47,6 +48,14 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e if (!empty($email)) { $email = \strtolower($email); + + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } } try { @@ -87,7 +96,8 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $phone, $name]) + 'search' => implode(' ', [$userId, $email, $phone, $name]), + 'accessedAt' => DateTime::now(), ])); } catch (Duplicate $th) { throw new Exception(Exception::USER_ALREADY_EXISTS); @@ -105,6 +115,7 @@ App::post('/v1/users') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'create') @@ -137,6 +148,7 @@ App::post('/v1/users/bcrypt') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createBcryptUser') @@ -167,6 +179,7 @@ App::post('/v1/users/md5') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createMD5User') @@ -197,6 +210,7 @@ App::post('/v1/users/argon2') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createArgon2User') @@ -227,6 +241,7 @@ App::post('/v1/users/sha') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createSHAUser') @@ -264,6 +279,7 @@ App::post('/v1/users/phpass') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createPHPassUser') @@ -294,6 +310,7 @@ App::post('/v1/users/scrypt') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createScryptUser') @@ -337,6 +354,7 @@ App::post('/v1/users/scrypt-modified') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createScryptModifiedUser') @@ -367,6 +385,7 @@ App::get('/v1/users') ->desc('List Users') ->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', 'list') @@ -387,7 +406,9 @@ App::get('/v1/users') } // Get cursor document if there was a cursor query - $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); $cursor = reset($cursor); if ($cursor) { /** @var Query $cursor */ @@ -413,6 +434,7 @@ App::get('/v1/users/:userId') ->desc('Get User') ->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', 'get') @@ -438,6 +460,7 @@ App::get('/v1/users/:userId/prefs') ->desc('Get User Preferences') ->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', 'getPrefs') @@ -465,6 +488,7 @@ App::get('/v1/users/:userId/sessions') ->desc('List User Sessions') ->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', 'listSessions') @@ -506,6 +530,7 @@ App::get('/v1/users/:userId/memberships') ->desc('List User Memberships') ->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', 'listMemberships') @@ -545,6 +570,7 @@ App::get('/v1/users/:userId/logs') ->desc('List User Logs') ->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', 'listLogs') @@ -622,6 +648,55 @@ App::get('/v1/users/:userId/logs') ]), Response::MODEL_LOG_LIST); }); +App::get('/v1/users/identities') + ->desc('List Identities') + ->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', '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) + ->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') + ->inject('dbForProject') + ->action(function (array $queries, string $search, Response $response, Database $dbForProject) { + + $queries = Query::parseQueries($queries); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + // Get cursor document if there was a cursor query + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + }); + $cursor = reset($cursor); + if ($cursor) { + /** @var Query $cursor */ + $identityId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('identities', $identityId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "User '{$identityId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + $response->dynamic(new Document([ + 'identities' => $dbForProject->find('identities', $queries), + 'total' => $dbForProject->count('identities', $filterQueries, APP_LIMIT_COUNT), + ]), Response::MODEL_IDENTITY_LIST); + }); + App::patch('/v1/users/:userId/status') ->desc('Update User Status') ->groups(['api', 'users']) @@ -630,6 +705,7 @@ App::patch('/v1/users/:userId/status') ->label('audits.event', 'user.update') ->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', 'updateStatus') @@ -665,7 +741,6 @@ App::put('/v1/users/:userId/labels') ->label('scope', 'users.write') ->label('audits.event', 'user.update') ->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') @@ -697,41 +772,6 @@ App::put('/v1/users/:userId/labels') $response->dynamic($user, Response::MODEL_USER); }); -App::patch('/v1/users/:userId/verification') - ->desc('Update Email Verification') - ->groups(['api', 'users']) - ->label('event', 'users.[userId].update.verification') - ->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', '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) - ->param('userId', '', new UID(), 'User ID.') - ->param('emailVerification', false, new Boolean(), 'User email verification status.') - ->inject('response') - ->inject('dbForProject') - ->inject('events') - ->action(function (string $userId, bool $emailVerification, Response $response, Database $dbForProject, Event $events) { - - $user = $dbForProject->getDocument('users', $userId); - - if ($user->isEmpty()) { - throw new Exception(Exception::USER_NOT_FOUND); - } - - $user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('emailVerification', $emailVerification)); - - $events - ->setParam('userId', $user->getId()); - - $response->dynamic($user, Response::MODEL_USER); - }); - App::patch('/v1/users/:userId/verification/phone') ->desc('Update Phone Verification') ->groups(['api', 'users']) @@ -739,6 +779,7 @@ App::patch('/v1/users/:userId/verification/phone') ->label('scope', 'users.write') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePhoneVerification') @@ -775,6 +816,7 @@ App::patch('/v1/users/:userId/name') ->label('audits.event', 'user.update') ->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', 'updateName') @@ -812,6 +854,7 @@ App::patch('/v1/users/:userId/password') ->label('audits.event', 'user.update') ->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', 'updatePassword') @@ -876,6 +919,7 @@ App::patch('/v1/users/:userId/email') ->label('audits.event', 'user.update') ->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', 'updateEmail') @@ -898,6 +942,15 @@ App::patch('/v1/users/:userId/email') $email = \strtolower($email); + // Makes sure this email is not already used in another identity + $identityWithMatchingEmail = $dbForProject->findOne('identities', [ + Query::equal('providerEmail', [$email]), + Query::notEqual('userId', $user->getId()), + ]); + if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + $user ->setAttribute('email', $email) ->setAttribute('emailVerification', false) @@ -922,6 +975,7 @@ App::patch('/v1/users/:userId/phone') ->label('scope', 'users.write') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePhone') @@ -966,6 +1020,7 @@ App::patch('/v1/users/:userId/verification') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{request.userId}') ->label('audits.userId', '{request.userId}') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateEmailVerification') @@ -998,6 +1053,7 @@ App::patch('/v1/users/:userId/prefs') ->groups(['api', 'users']) ->label('event', 'users.[userId].update.prefs') ->label('scope', 'users.write') + ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePrefs') @@ -1033,6 +1089,7 @@ App::delete('/v1/users/:userId/sessions/:sessionId') ->label('scope', 'users.write') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{request.userId}') + ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'deleteSession') @@ -1076,6 +1133,7 @@ App::delete('/v1/users/:userId/sessions') ->label('scope', 'users.write') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') + ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'deleteSessions') @@ -1118,6 +1176,7 @@ App::delete('/v1/users/:userId') ->label('scope', 'users.write') ->label('audits.event', 'user.delete') ->label('audits.resource', 'user/{request.userId}') + ->label('usage.metric', 'users.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'delete') @@ -1153,6 +1212,38 @@ App::delete('/v1/users/:userId') $response->noContent(); }); +App::delete('/v1/users/identities/:identityId') + ->desc('Delete Identity') + ->groups(['api', 'users']) + ->label('event', 'users.[userId].identities.[identityId].delete') + ->label('scope', 'users.write') + ->label('audits.event', 'identity.delete') + ->label('audits.resource', 'identity/{request.$identityId}') + ->label('usage.metric', 'users.{scope}.requests.delete') + ->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) + ->param('identityId', '', new UID(), 'Identity ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('events') + ->inject('deletes') + ->action(function (string $identityId, Response $response, Database $dbForProject, Event $events, Delete $deletes) { + + $identity = $dbForProject->getDocument('identities', $identityId); + + if ($identity->isEmpty()) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $dbForProject->deleteDocument('identities', $identityId); + + return $response->noContent(); + }); + App::get('/v1/users/usage') ->desc('Get usage stats for the users API') ->groups(['api', 'users', 'usage']) @@ -1164,59 +1255,96 @@ App::get('/v1/users/usage') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USAGE_USERS) ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) + ->param('provider', '', new WhiteList(\array_merge(['email', 'anonymous'], \array_map(fn ($value) => "oauth-" . $value, \array_keys(Config::getParam('providers', [])))), true), 'Provider Name.', true) ->inject('response') ->inject('dbForProject') ->inject('register') - ->action(function (string $range, Response $response, Database $dbForProject) { + ->action(function (string $range, string $provider, Response $response, Database $dbForProject) { - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - METRIC_USERS, - METRIC_SESSIONS, - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'usersTotal' => $usage[$metrics[0]], - 'sessionsTotal' => $usage[$metrics[1]], - ]), Response::MODEL_USAGE_USERS); + $metrics = [ + 'users.$all.count.total', + 'users.$all.requests.create', + 'users.$all.requests.read', + 'users.$all.requests.update', + 'users.$all.requests.delete', + 'sessions.$all.requests.create', + 'sessions.$all.requests.delete', + "sessions.$provider.requests.create", + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '1h' => 3600, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'usersCount' => $stats['users.$all.count.total'] ?? [], + 'usersCreate' => $stats['users.$all.requests.create'] ?? [], + 'usersRead' => $stats['users.$all.requests.read'] ?? [], + 'usersUpdate' => $stats['users.$all.requests.update'] ?? [], + 'usersDelete' => $stats['users.$all.requests.delete'] ?? [], + 'sessionsCreate' => $stats['sessions.$all.requests.create'] ?? [], + 'sessionsProviderCreate' => $stats["sessions.$provider.requests.create"] ?? [], + 'sessionsDelete' => $stats['sessions.$all.requests.delete' ?? []] + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_USERS); }); diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php new file mode 100644 index 0000000000..543a7e6b8b --- /dev/null +++ b/app/controllers/api/vcs.php @@ -0,0 +1,1090 @@ +getAttribute('resourceType'); + + if ($resourceType === "function") { + $projectId = $resource->getAttribute('projectId'); + $project = Authorization::skip(fn () => $dbForConsole->getDocument('projects', $projectId)); + $dbForProject = $getProjectDB($project); + + $functionId = $resource->getAttribute('resourceId'); + $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); + + $deploymentId = ID::unique(); + $repositoryId = $resource->getId(); + $repositoryInternalId = $resource->getInternalId(); + $providerRepositoryId = $resource->getAttribute('providerRepositoryId'); + $installationId = $resource->getAttribute('installationId'); + $installationInternalId = $resource->getAttribute('installationInternalId'); + $productionBranch = $function->getAttribute('providerBranch'); + $activate = false; + + if ($providerBranch == $productionBranch && $external === false) { + $activate = true; + } + + $owner = $github->getOwnerName($providerInstallationId) ?? ''; + $repositoryName = $github->getRepositoryName($providerRepositoryId) ?? ''; + + if (empty($repositoryName)) { + throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND); + } + + $isAuthorized = !$external; + + if (!$isAuthorized && !empty($providerPullRequestId)) { + if (\in_array($providerPullRequestId, $resource->getAttribute('providerPullRequestIds', []))) { + $isAuthorized = true; + } + } + + $commentStatus = $isAuthorized ? 'waiting' : 'failed'; + + $authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}"; + + $action = $isAuthorized ? ['type' => 'logs'] : ['type' => 'authorize', 'url' => $authorizeUrl]; + + $latestCommentId = ''; + + if (!empty($providerPullRequestId)) { + $latestComment = Authorization::skip(fn () => $dbForConsole->findOne('vcsComments', [ + Query::equal('providerRepositoryId', [$providerRepositoryId]), + Query::equal('providerPullRequestId', [$providerPullRequestId]), + Query::orderDesc('$createdAt'), + ])); + + if ($latestComment !== false && !$latestComment->isEmpty()) { + $latestCommentId = $latestComment->getAttribute('providerCommentId', ''); + $comment = new Comment(); + $comment->parseComment($github->getComment($owner, $repositoryName, $latestCommentId)); + $comment->addBuild($project, $function, $commentStatus, $deploymentId, $action); + + $latestCommentId = \strval($github->updateComment($owner, $repositoryName, $latestCommentId, $comment->generateComment())); + } else { + $comment = new Comment(); + $comment->addBuild($project, $function, $commentStatus, $deploymentId, $action); + $latestCommentId = \strval($github->createComment($owner, $repositoryName, $providerPullRequestId, $comment->generateComment())); + + if (!empty($latestCommentId)) { + $teamId = $project->getAttribute('teamId', ''); + + $latestComment = Authorization::skip(fn () => $dbForConsole->createDocument('vcsComments', new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::team(ID::custom($teamId))), + Permission::update(Role::team(ID::custom($teamId), 'owner')), + Permission::update(Role::team(ID::custom($teamId), 'developer')), + Permission::delete(Role::team(ID::custom($teamId), 'owner')), + Permission::delete(Role::team(ID::custom($teamId), 'developer')), + ], + 'installationInternalId' => $installationInternalId, + 'installationId' => $installationId, + 'projectInternalId' => $project->getInternalId(), + 'projectId' => $project->getId(), + 'providerRepositoryId' => $providerRepositoryId, + 'providerBranch' => $providerBranch, + 'providerPullRequestId' => $providerPullRequestId, + 'providerCommentId' => $latestCommentId + ]))); + } + } + } elseif (!empty($providerBranch)) { + $latestComments = Authorization::skip(fn () => $dbForConsole->find('vcsComments', [ + Query::equal('providerRepositoryId', [$providerRepositoryId]), + Query::equal('providerBranch', [$providerBranch]), + Query::orderDesc('$createdAt'), + ])); + + foreach ($latestComments as $comment) { + $latestCommentId = $comment->getAttribute('providerCommentId', ''); + $comment = new Comment(); + $comment->parseComment($github->getComment($owner, $repositoryName, $latestCommentId)); + $comment->addBuild($project, $function, $commentStatus, $deploymentId, $action); + + $latestCommentId = \strval($github->updateComment($owner, $repositoryName, $latestCommentId, $comment->generateComment())); + } + } + + if (!$isAuthorized) { + $functionName = $function->getAttribute('name'); + $projectName = $project->getAttribute('name'); + $name = "{$functionName} ({$projectName})"; + $message = 'Authorization required for external contributor.'; + + $providerRepositoryId = $resource->getAttribute('providerRepositoryId'); + $repositoryName = $github->getRepositoryName($providerRepositoryId); + $owner = $github->getOwnerName($providerInstallationId); + $github->updateCommitStatus($repositoryName, $providerCommitHash, $owner, 'failure', $message, $authorizeUrl, $name); + continue; + } + + if ($external) { + $pullRequestResponse = $github->getPullRequest($owner, $repositoryName, $providerPullRequestId); + $providerRepositoryName = $pullRequestResponse['head']['repo']['owner']['login']; + $providerRepositoryOwner = $pullRequestResponse['head']['repo']['name']; + } + + $deployment = $dbForProject->createDocument('deployments', new Document([ + '$id' => $deploymentId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'resourceId' => $functionId, + 'resourceType' => 'functions', + 'entrypoint' => $function->getAttribute('entrypoint'), + 'commands' => $function->getAttribute('commands'), + 'type' => 'vcs', + 'installationId' => $installationId, + 'installationInternalId' => $installationInternalId, + 'providerRepositoryId' => $providerRepositoryId, + 'repositoryId' => $repositoryId, + 'repositoryInternalId' => $repositoryInternalId, + 'providerBranchUrl' => $providerBranchUrl, + 'providerRepositoryName' => $providerRepositoryName, + 'providerRepositoryOwner' => $providerRepositoryOwner, + 'providerRepositoryUrl' => $providerRepositoryUrl, + 'providerCommitHash' => $providerCommitHash, + 'providerCommitAuthorUrl' => $providerCommitAuthorUrl, + 'providerCommitAuthor' => $providerCommitAuthor, + 'providerCommitMessage' => $providerCommitMessage, + 'providerCommitUrl' => $providerCommitUrl, + 'providerCommentId' => \strval($latestCommentId), + 'providerBranch' => $providerBranch, + 'search' => implode(' ', [$deploymentId, $function->getAttribute('entrypoint')]), + 'activate' => $activate, + ])); + + if (!empty($providerCommitHash) && $function->getAttribute('providerSilentMode', false) === false) { + $functionName = $function->getAttribute('name'); + $projectName = $project->getAttribute('name'); + $name = "{$functionName} ({$projectName})"; + $message = 'Starting...'; + + $providerRepositoryId = $resource->getAttribute('providerRepositoryId'); + $repositoryName = $github->getRepositoryName($providerRepositoryId); + $owner = $github->getOwnerName($providerInstallationId); + + $providerTargetUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$projectId/functions/function-$functionId"; + $github->updateCommitStatus($repositoryName, $providerCommitHash, $owner, 'pending', $message, $providerTargetUrl, $name); + } + + $buildEvent = new Build(); + $buildEvent + ->setType(BUILD_TYPE_DEPLOYMENT) + ->setResource($function) + ->setDeployment($deployment) + ->setProject($project) + ->trigger(); + + //TODO: Add event? + } + } +}; + +App::get('/v1/vcs/github/authorize') + ->desc('Install GitHub App') + ->groups(['api', 'vcs']) + ->label('scope', 'vcs.read') + ->label('sdk.namespace', 'vcs') + ->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) + ->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') + ->inject('response') + ->inject('project') + ->action(function (string $success, string $failure, Request $request, Response $response, Document $project) { + $state = \json_encode([ + 'projectId' => $project->getId(), + 'success' => $success, + 'failure' => $failure, + ]); + + $appName = App::getEnv('_APP_VCS_GITHUB_APP_NAME'); + $url = "https://github.com/apps/$appName/installations/new?" . \http_build_query([ + 'state' => $state, + 'redirect_uri' => $request->getProtocol() . '://' . $request->getHostname() . "/v1/vcs/github/callback" + ]); + + $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($url); + }); + +App::get('/v1/vcs/github/callback') + ->desc('Capture installation and authorization from GitHub App') + ->groups(['api', 'vcs']) + ->label('scope', 'public') + ->label('error', __DIR__ . '/../../views/general/error.phtml') + ->param('installation_id', '', new Text(256, 0), 'GitHub installation ID', true) + ->param('setup_action', '', new Text(256, 0), 'GitHub setup actuon type', true) + ->param('state', '', new Text(2048), 'GitHub state. Contains info sent when starting authorization flow.', true) + ->param('code', '', new Text(2048, 0), 'OAuth2 code. This is a temporary code that the will be later exchanged for an access token.', true) + ->inject('gitHub') + ->inject('user') + ->inject('project') + ->inject('request') + ->inject('response') + ->inject('dbForConsole') + ->action(function (string $providerInstallationId, string $setupAction, string $state, string $code, GitHub $github, Document $user, Document $project, Request $request, Response $response, Database $dbForConsole) { + if (empty($state)) { + $error = 'Installation requests from organisation members for the Appwrite GitHub App are currently unsupported. To proceed with the installation, login to the Appwrite Console and install the GitHub App.'; + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $error); + } + + $state = \json_decode($state, true); + $projectId = $state['projectId'] ?? ''; + + $defaultState = [ + 'success' => $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$projectId/settings/git-installations", + 'failure' => $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$projectId/settings/git-installations", + ]; + + $state = \array_merge($defaultState, $state ?? []); + + $redirectSuccess = $state['success'] ?? ''; + $redirectFailure = $state['failure'] ?? ''; + + $project = $dbForConsole->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + $error = 'Project with the ID from state could not be found.'; + + if (!empty($redirectFailure)) { + $separator = \str_contains($redirectFailure, '?') ? '&' : ':'; + return $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($redirectFailure . $separator . \http_build_query(['error' => $error])); + } + + throw new Exception(Exception::PROJECT_NOT_FOUND, $error); + } + + $personalSlug = ''; + + // OAuth Authroization + if (!empty($code)) { + $oauth2 = new OAuth2Github(App::getEnv('_APP_VCS_GITHUB_CLIENT_ID', ''), App::getEnv('_APP_VCS_GITHUB_CLIENT_SECRET', ''), ""); + $accessToken = $oauth2->getAccessToken($code) ?? ''; + $refreshToken = $oauth2->getRefreshToken($code) ?? ''; + $accessTokenExpiry = $oauth2->getAccessTokenExpiry($code) ?? ''; + $personalSlug = $oauth2->getUserSlug($accessToken) ?? ''; + $email = $oauth2->getUserEmail($accessToken); + $oauth2ID = $oauth2->getUserID($accessToken); + + // Makes sure this email is not already used in another identity + $identity = $dbForConsole->findOne('identities', [ + Query::equal('providerEmail', [$email]), + ]); + if ($identity !== false && !$identity->isEmpty()) { + if ($identity->getAttribute('userInternalId', '') !== $user->getInternalId()) { + throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS); + } + } + + if ($identity !== false && !$identity->isEmpty()) { + $identity = $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry)); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } else { + $identity = $dbForConsole->createDocument('identities', new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::user($user->getId())), + Permission::delete(Role::user($user->getId())), + ], + 'userInternalId' => $user->getInternalId(), + 'userId' => $user->getId(), + 'provider' => 'github', + 'providerUid' => $oauth2ID, + 'providerEmail' => $email, + 'providerAccessToken' => $accessToken, + 'providerRefreshToken' => $refreshToken, + 'providerAccessTokenExpiry' => DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry), + ])); + } + } + + // Create / Update installation + if (!empty($providerInstallationId)) { + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + $owner = $github->getOwnerName($providerInstallationId) ?? ''; + + $projectInternalId = $project->getInternalId(); + + $installation = $dbForConsole->findOne('installations', [ + Query::equal('providerInstallationId', [$providerInstallationId]), + Query::equal('projectInternalId', [$projectInternalId]) + ]); + + if ($installation === false || $installation->isEmpty()) { + $teamId = $project->getAttribute('teamId', ''); + + $installation = new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::team(ID::custom($teamId))), + Permission::update(Role::team(ID::custom($teamId), 'owner')), + Permission::update(Role::team(ID::custom($teamId), 'developer')), + Permission::delete(Role::team(ID::custom($teamId), 'owner')), + Permission::delete(Role::team(ID::custom($teamId), 'developer')), + ], + 'providerInstallationId' => $providerInstallationId, + 'projectId' => $projectId, + 'projectInternalId' => $projectInternalId, + 'provider' => 'github', + 'organization' => $owner, + 'personal' => $personalSlug === $owner + ]); + + $installation = $dbForConsole->createDocument('installations', $installation); + } else { + $installation = $installation + ->setAttribute('organization', $owner) + ->setAttribute('personal', $personalSlug === $owner); + $installation = $dbForConsole->updateDocument('installations', $installation->getId(), $installation); + } + } else { + $error = 'Installation of the Appwrite GitHub App on organization accounts is restricted to organization owners. As a member of the organization, you do not have the necessary permissions to install this GitHub App. Please contact the organization owner to create the installation from the Appwrite console.'; + + if (!empty($redirectFailure)) { + $separator = \str_contains($redirectFailure, '?') ? '&' : ':'; + return $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($redirectFailure . $separator . \http_build_query(['error' => $error])); + } + + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $error); + } + + $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Pragma', 'no-cache') + ->redirect($redirectSuccess); + }); + +App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/detection') + ->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) + ->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) + ->inject('gitHub') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, GitHub $github, Response $response, Document $project, Database $dbForConsole) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + $owner = $github->getOwnerName($providerInstallationId); + $repositoryName = $github->getRepositoryName($providerRepositoryId); + + if (empty($repositoryName)) { + throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND); + } + + $files = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory); + $languages = $github->listRepositoryLanguages($owner, $repositoryName); + + $detectorFactory = new Detector($files, $languages); + + $detectorFactory + ->addDetector(new JavaScript()) + ->addDetector(new PHP()) + ->addDetector(new Python()) + ->addDetector(new Dart()) + ->addDetector(new Swift()) + ->addDetector(new Ruby()) + ->addDetector(new Java()) + ->addDetector(new CPP()) + ->addDetector(new Deno()) + ->addDetector(new Dotnet()); + + $runtime = $detectorFactory->detect(); + + $runtimes = Config::getParam('runtimes'); + $runtimeDetail = \array_reverse(\array_filter(\array_keys($runtimes), function ($key) use ($runtime, $runtimes) { + return $runtimes[$key]['key'] === $runtime; + }))[0] ?? ''; + + $detection = []; + $detection['runtime'] = $runtimeDetail; + + $response->dynamic(new Document($detection), Response::MODEL_DETECTION); + }); + +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) + ->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') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $installationId, string $search, GitHub $github, Response $response, Document $project, Database $dbForConsole) { + if (empty($search)) { + $search = ""; + } + + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + $page = 1; + $perPage = 4; + + $owner = $github->getOwnerName($providerInstallationId); + $repos = $github->searchRepositories($owner, $page, $perPage, $search); + + $repos = \array_map(function ($repo) use ($installation) { + $repo['id'] = \strval($repo['id'] ?? ''); + $repo['pushedAt'] = $repo['pushed_at'] ?? null; + $repo['provider'] = $installation->getAttribute('provider', '') ?? ''; + $repo['organization'] = $installation->getAttribute('organization', '') ?? ''; + return $repo; + }, $repos); + + $repos = batch(\array_map(function ($repo) use ($github) { + return function () use ($repo, $github) { + try { + $files = $github->listRepositoryContents($repo['organization'], $repo['name'], ''); + $languages = $github->listRepositoryLanguages($repo['organization'], $repo['name']); + + $detectorFactory = new Detector($files, $languages); + + $detectorFactory + ->addDetector(new JavaScript()) + ->addDetector(new PHP()) + ->addDetector(new Python()) + ->addDetector(new Dart()) + ->addDetector(new Swift()) + ->addDetector(new Ruby()) + ->addDetector(new Java()) + ->addDetector(new CPP()) + ->addDetector(new Deno()) + ->addDetector(new Dotnet()); + + $runtime = $detectorFactory->detect(); + + $runtimes = Config::getParam('runtimes'); + $runtimeDetail = \array_reverse(\array_filter(\array_keys($runtimes), function ($key) use ($runtime, $runtimes) { + return $runtimes[$key]['key'] === $runtime; + }))[0] ?? ''; + + $repo['runtime'] = $runtimeDetail; + } catch (Throwable $error) { + $repo['runtime'] = ""; + Console::warning("Runtime not detected for " . $repo['organization'] . "/" . $repo['name']); + } + return $repo; + }; + }, $repos)); + + $repos = \array_map(function ($repo) { + return new Document($repo); + }, $repos); + + $response->dynamic(new Document([ + 'providerRepositories' => $repos, + 'total' => \count($repos), + ]), Response::MODEL_PROVIDER_REPOSITORY_LIST); + }); + +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) + ->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') + ->inject('gitHub') + ->inject('user') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $installationId, string $name, bool $private, GitHub $github, Document $user, Response $response, Document $project, Database $dbForConsole) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + if ($installation->getAttribute('personal', false) === true) { + $oauth2 = new OAuth2Github(App::getEnv('_APP_VCS_GITHUB_CLIENT_ID', ''), App::getEnv('_APP_VCS_GITHUB_CLIENT_SECRET', ''), ""); + + $identity = $dbForConsole->findOne('identities', [ + Query::equal('provider', ['github']), + Query::equal('userInternalId', [$user->getInternalId()]), + ]); + if ($identity === false || $identity->isEmpty()) { + throw new Exception(Exception::USER_IDENTITY_NOT_FOUND); + } + + $accessToken = $identity->getAttribute('providerAccessToken'); + $refreshToken = $identity->getAttribute('providerRefreshToken'); + $accessTokenExpiry = $identity->getAttribute('providerAccessTokenExpiry'); + + $isExpired = new \DateTime($accessTokenExpiry) < new \DateTime('now'); + if ($isExpired) { + $oauth2->refreshTokens($refreshToken); + + $accessToken = $oauth2->getAccessToken(''); + $refreshToken = $oauth2->getRefreshToken(''); + + $verificationId = $oauth2->getUserID($accessToken); + + if (empty($verificationId)) { + throw new Exception(Exception::GENERAL_RATE_LIMIT_EXCEEDED, "Another request is currently refreshing OAuth token. Please try again."); + } + + $identity = $identity + ->setAttribute('providerAccessToken', $accessToken) + ->setAttribute('providerRefreshToken', $refreshToken) + ->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$oauth2->getAccessTokenExpiry(''))); + + $dbForConsole->updateDocument('identities', $identity->getId(), $identity); + } + + try { + $repository = $oauth2->createRepository($accessToken, $name, $private); + } catch (Exception $exception) { + throw new Exception(Exception::GENERAL_PROVIDER_FAILURE, "GitHub failed to process the request: " . $exception->getMessage()); + } + } else { + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + $owner = $github->getOwnerName($providerInstallationId); + + try { + $repository = $github->createRepository($owner, $name, $private); + } catch (Exception $exception) { + throw new Exception(Exception::GENERAL_PROVIDER_FAILURE, "GitHub failed to process the request: " . $exception->getMessage()); + } + } + + if (isset($repository['errors'])) { + $message = $repository['message'] ?? 'Unknown error.'; + if (isset($repository['errors'][0])) { + $message .= ' ' . $repository['errors'][0]['message']; + } + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Provider Error: ' . $message); + } + + if (isset($repository['message'])) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Provider Error: ' . $repository['message']); + } + + $repository['id'] = \strval($repository['id']) ?? ''; + $repository['pushedAt'] = $repository['pushed_at'] ?? ''; + $repository['organization'] = $installation->getAttribute('organization', ''); + $repository['provider'] = $installation->getAttribute('provider', ''); + + $response->dynamic(new Document($repository), Response::MODEL_PROVIDER_REPOSITORY); + }); + +App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId') + ->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) + ->param('installationId', '', new Text(256), 'Installation Id') + ->param('providerRepositoryId', '', new Text(256), 'Repository Id') + ->inject('gitHub') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $installationId, string $providerRepositoryId, GitHub $github, Response $response, Document $project, Database $dbForConsole) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + $owner = $github->getOwnerName($providerInstallationId) ?? ''; + $repositoryName = $github->getRepositoryName($providerRepositoryId) ?? ''; + + if (empty($repositoryName)) { + throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND); + } + + $repository = $github->getRepository($owner, $repositoryName); + + $repository['id'] = \strval($repository['id']) ?? ''; + $repository['pushedAt'] = $repository['pushed_at'] ?? ''; + $repository['organization'] = $installation->getAttribute('organization', ''); + $repository['provider'] = $installation->getAttribute('provider', ''); + + $response->dynamic(new Document($repository), Response::MODEL_PROVIDER_REPOSITORY); + }); + +App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/branches') + ->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) + ->param('installationId', '', new Text(256), 'Installation Id') + ->param('providerRepositoryId', '', new Text(256), 'Repository Id') + ->inject('gitHub') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $installationId, string $providerRepositoryId, GitHub $github, Response $response, Document $project, Database $dbForConsole) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + $owner = $github->getOwnerName($providerInstallationId) ?? ''; + $repositoryName = $github->getRepositoryName($providerRepositoryId) ?? ''; + + if (empty($repositoryName)) { + throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND); + } + + $branches = $github->listBranches($owner, $repositoryName) ?? []; + + $response->dynamic(new Document([ + 'branches' => \array_map(function ($branch) { + return new Document(['name' => $branch]); + }, $branches), + 'total' => \count($branches), + ]), Response::MODEL_BRANCH_LIST); + }); + +App::post('/v1/vcs/github/events') + ->desc('Create Event') + ->groups(['api', 'vcs']) + ->label('scope', 'public') + ->inject('gitHub') + ->inject('request') + ->inject('response') + ->inject('dbForConsole') + ->inject('getProjectDB') + ->action( + function (GitHub $github, Request $request, Response $response, Database $dbForConsole, callable $getProjectDB) use ($createGitDeployments) { + $signature = $request->getHeader('x-hub-signature-256', ''); + $payload = $request->getRawPayload(); + + $signatureKey = App::getEnv('_APP_VCS_GITHUB_WEBHOOK_SECRET', ''); + + $valid = $github->validateWebhookEvent($payload, $signature, $signatureKey); + if (!$valid) { + throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, "Invalid webhook signature."); + } + + $event = $request->getHeader('x-github-event', ''); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $parsedPayload = $github->getEvent($event, $payload); + + if ($event == $github::EVENT_PUSH) { + $providerBranchCreated = $parsedPayload["branchCreated"] ?? false; + $providerBranch = $parsedPayload["branch"] ?? ''; + $providerBranchUrl = $parsedPayload["branchUrl"] ?? ''; + $providerRepositoryId = $parsedPayload["repositoryId"] ?? ''; + $providerRepositoryName = $parsedPayload["repositoryName"] ?? ''; + $providerInstallationId = $parsedPayload["installationId"] ?? ''; + $providerRepositoryUrl = $parsedPayload["repositoryUrl"] ?? ''; + $providerCommitHash = $parsedPayload["commitHash"] ?? ''; + $providerRepositoryOwner = $parsedPayload["owner"] ?? ''; + $providerCommitAuthor = $parsedPayload["headCommitAuthor"] ?? ''; + $providerCommitAuthorUrl = $parsedPayload["authorUrl"] ?? ''; + $providerCommitMessage = $parsedPayload["headCommitMessage"] ?? ''; + $providerCommitUrl = $parsedPayload["headCommitUrl"] ?? ''; + + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + //find functionId from functions table + $repositories = $dbForConsole->find('repositories', [ + Query::equal('providerRepositoryId', [$providerRepositoryId]), + Query::limit(100), + ]); + + // create new deployment only on push and not when branch is created + if (!$providerBranchCreated) { + $createGitDeployments($github, $providerInstallationId, $repositories, $providerBranch, $providerBranchUrl, $providerRepositoryName, $providerRepositoryUrl, $providerRepositoryOwner, $providerCommitHash, $providerCommitAuthor, $providerCommitAuthorUrl, $providerCommitMessage, $providerCommitUrl, '', false, $dbForConsole, $getProjectDB, $request); + } + } elseif ($event == $github::EVENT_INSTALLATION) { + if ($parsedPayload["action"] == "deleted") { + // TODO: Use worker for this job instead (update function as well) + $providerInstallationId = $parsedPayload["installationId"]; + + $installations = $dbForConsole->find('installations', [ + Query::equal('providerInstallationId', [$providerInstallationId]), + Query::limit(1000) + ]); + + foreach ($installations as $installation) { + $repositories = $dbForConsole->find('repositories', [ + Query::equal('installationInternalId', [$installation->getInternalId()]), + Query::limit(1000) + ]); + + foreach ($repositories as $repository) { + $dbForConsole->deleteDocument('repositories', $repository->getId()); + } + + $dbForConsole->deleteDocument('installations', $installation->getId()); + } + } + } elseif ($event == $github::EVENT_PULL_REQUEST) { + if ($parsedPayload["action"] == "opened" || $parsedPayload["action"] == "reopened" || $parsedPayload["action"] == "synchronize") { + $providerBranch = $parsedPayload["branch"] ?? ''; + $providerBranchUrl = $parsedPayload["branchUrl"] ?? ''; + $providerRepositoryId = $parsedPayload["repositoryId"] ?? ''; + $providerRepositoryName = $parsedPayload["repositoryName"] ?? ''; + $providerInstallationId = $parsedPayload["installationId"] ?? ''; + $providerRepositoryUrl = $parsedPayload["repositoryUrl"] ?? ''; + $providerPullRequestId = $parsedPayload["pullRequestNumber"] ?? ''; + $providerCommitHash = $parsedPayload["commitHash"] ?? ''; + $providerRepositoryOwner = $parsedPayload["owner"] ?? ''; + $external = $parsedPayload["external"] ?? true; + $providerCommitUrl = $parsedPayload["headCommitUrl"] ?? ''; + $providerCommitAuthorUrl = $parsedPayload["authorUrl"] ?? ''; + + // Ignore sync for non-external. We handle it in push webhook + if (!$external && $parsedPayload["action"] == "synchronize") { + return $response->json($parsedPayload); + } + + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + $commitDetails = $github->getCommit($providerRepositoryOwner, $providerRepositoryName, $providerCommitHash); + $providerCommitAuthor = $commitDetails["commitAuthor"] ?? ''; + $providerCommitMessage = $commitDetails["commitMessage"] ?? ''; + + $repositories = $dbForConsole->find('repositories', [ + Query::equal('providerRepositoryId', [$providerRepositoryId]), + Query::orderDesc('$createdAt') + ]); + + $createGitDeployments($github, $providerInstallationId, $repositories, $providerBranch, $providerBranchUrl, $providerRepositoryName, $providerRepositoryUrl, $providerRepositoryOwner, $providerCommitHash, $providerCommitAuthor, $providerCommitAuthorUrl, $providerCommitMessage, $providerCommitUrl, $providerPullRequestId, $external, $dbForConsole, $getProjectDB, $request); + } elseif ($parsedPayload["action"] == "closed") { + // Allowed external contributions cleanup + + $providerRepositoryId = $parsedPayload["repositoryId"] ?? ''; + $providerPullRequestId = $parsedPayload["pullRequestNumber"] ?? ''; + $external = $parsedPayload["external"] ?? true; + + if ($external) { + $repositories = $dbForConsole->find('repositories', [ + Query::equal('providerRepositoryId', [$providerRepositoryId]), + Query::orderDesc('$createdAt') + ]); + + foreach ($repositories as $repository) { + $providerPullRequestIds = $repository->getAttribute('providerPullRequestIds', []); + + if (\in_array($providerPullRequestId, $providerPullRequestIds)) { + $providerPullRequestIds = \array_diff($providerPullRequestIds, [$providerPullRequestId]); + $repository = $repository->setAttribute('providerPullRequestIds', $providerPullRequestIds); + $repository = Authorization::skip(fn () => $dbForConsole->updateDocument('repositories', $repository->getId(), $repository)); + } + } + } + } + } + + $response->json($parsedPayload); + } + ); + +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) + ->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') + ->inject('project') + ->inject('dbForProject') + ->inject('dbForConsole') + ->action(function (array $queries, string $search, Response $response, Document $project, Database $dbForProject, Database $dbForConsole) { + $queries = Query::parseQueries($queries); + + $queries[] = Query::equal('projectInternalId', [$project->getInternalId()]); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + // Get cursor document if there was a cursor query + $cursor = Query::getByType($queries, [Query::TYPE_CURSORAFTER, Query::TYPE_CURSORBEFORE]); + $cursor = reset($cursor); + if ($cursor) { + /** @var Query $cursor */ + $installationId = $cursor->getValue(); + $cursorDocument = $dbForConsole->getDocument('installations', $installationId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Installation '{$installationId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + $results = $dbForConsole->find('installations', $queries); + $total = $dbForConsole->count('installations', $filterQueries, APP_LIMIT_COUNT); + + $response->dynamic(new Document([ + 'installations' => $results, + 'total' => $total, + ]), Response::MODEL_INSTALLATION_LIST); + }); + +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) + ->param('installationId', '', new Text(256), 'Installation Id') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->action(function (string $installationId, Response $response, Document $project, Database $dbForConsole) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation === false || $installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + if ($installation->getAttribute('projectInternalId') !== $project->getInternalId()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + $response->dynamic($installation, Response::MODEL_INSTALLATION); + }); + +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) + ->param('installationId', '', new Text(256), 'Installation Id') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->inject('deletes') + ->action(function (string $installationId, Response $response, Document $project, Database $dbForConsole, Delete $deletes) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + if (!$dbForConsole->deleteDocument('installations', $installation->getId())) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove installation from DB'); + } + + $deletes + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($installation); + + $response->noContent(); + }); + +App::patch('/v1/vcs/github/installations/:installationId/repositories/:repositoryId') + ->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) + ->param('installationId', '', new Text(256), 'Installation Id') + ->param('repositoryId', '', new Text(256), 'VCS Repository Id') + ->param('providerPullRequestId', '', new Text(256), 'GitHub Pull Request Id') + ->inject('gitHub') + ->inject('request') + ->inject('response') + ->inject('project') + ->inject('dbForConsole') + ->inject('getProjectDB') + ->action(function (string $installationId, string $repositoryId, string $providerPullRequestId, GitHub $github, Request $request, Response $response, Document $project, Database $dbForConsole, callable $getProjectDB) use ($createGitDeployments) { + $installation = $dbForConsole->getDocument('installations', $installationId); + + if ($installation->isEmpty()) { + throw new Exception(Exception::INSTALLATION_NOT_FOUND); + } + + $repository = $dbForConsole->getDocument('repositories', $repositoryId, [ + Query::equal('projectInternalId', [$project->getInternalId()]) + ]); + + if ($repository->isEmpty()) { + throw new Exception(Exception::REPOSITORY_NOT_FOUND); + } + + if (\in_array($providerPullRequestId, $repository->getAttribute('providerPullRequestIds', []))) { + throw new Exception(Exception::PROVIDER_CONTRIBUTION_CONFLICT); + } + + $providerPullRequestIds = \array_unique(\array_merge($repository->getAttribute('providerPullRequestIds', []), [$providerPullRequestId])); + $repository = $repository->setAttribute('providerPullRequestIds', $providerPullRequestIds); + + // TODO: Delete from array when PR is closed + + $repository = $dbForConsole->updateDocument('repositories', $repository->getId(), $repository); + + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + + $repositories = [$repository]; + $providerRepositoryId = $repository->getAttribute('providerRepositoryId'); + + $owner = $github->getOwnerName($providerInstallationId); + $repositoryName = $github->getRepositoryName($providerRepositoryId); + $pullRequestResponse = $github->getPullRequest($owner, $repositoryName, $providerPullRequestId); + + $providerBranch = \explode(':', $pullRequestResponse['head']['label'])[1] ?? ''; + $providerCommitHash = $pullRequestResponse['head']['sha'] ?? ''; + + $createGitDeployments($github, $providerInstallationId, $repositories, $providerBranch, $providerCommitHash, $providerPullRequestId, true, $dbForConsole, $getProjectDB, $request); + + $response->noContent(); + }); diff --git a/app/controllers/general.php b/app/controllers/general.php index e8d6bb225a..e3b47098b2 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -8,6 +8,9 @@ use Utopia\Locale\Locale; use Utopia\Logger\Logger; use Utopia\Logger\Log; use Utopia\Logger\Log\User; +use Swoole\Http\Request as SwooleRequest; +use Utopia\Cache\Cache; +use Utopia\Pools\Group; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Appwrite\Utopia\View; @@ -22,6 +25,7 @@ use Appwrite\Utopia\Response\Filters\V12 as ResponseV12; use Appwrite\Utopia\Response\Filters\V13 as ResponseV13; use Appwrite\Utopia\Response\Filters\V14 as ResponseV14; use Appwrite\Utopia\Response\Filters\V15 as ResponseV15; +use Appwrite\Utopia\Response\Filters\V16 as ResponseV16; use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\DateTime; @@ -33,6 +37,7 @@ use Appwrite\Utopia\Request\Filters\V12 as RequestV12; use Appwrite\Utopia\Request\Filters\V13 as RequestV13; use Appwrite\Utopia\Request\Filters\V14 as RequestV14; use Appwrite\Utopia\Request\Filters\V15 as RequestV15; +use Appwrite\Utopia\Request\Filters\V16 as RequestV16; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; @@ -40,9 +45,136 @@ Config::setParam('domainVerification', false); Config::setParam('cookieDomain', 'localhost'); Config::setParam('cookieSamesite', Response::COOKIE_SAMESITE_NONE); +function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleRequest, Request $request, Response $response) +{ + $utopia->getRoute()?->label('error', __DIR__ . '/../views/general/error.phtml'); + + $host = $request->getHostname() ?? ''; + + $route = Authorization::skip( + fn () => $dbForConsole->find('rules', [ + Query::equal('domain', [$host]), + Query::limit(1) + ]) + )[0] ?? null; + + if ($route === null) { + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + + if ($mainDomain === 'localhost') { + throw new AppwriteException(AppwriteException::ROUTER_DOMAIN_NOT_CONFIGURED); + } else { + throw new AppwriteException(AppwriteException::ROUTER_HOST_NOT_FOUND); + } + } + + $projectId = $route->getAttribute('projectId'); + $project = Authorization::skip( + fn () => $dbForConsole->getDocument('projects', $projectId) + ); + if (array_key_exists('proxy', $project->getAttribute('services', []))) { + $status = $project->getAttribute('services', [])['proxy']; + if (!$status) { + throw new AppwriteException(AppwriteException::GENERAL_SERVICE_DISABLED); + } + } + + // Skip Appwrite Router for ACME challenge. Nessessary for certificate generation + $path = ($swooleRequest->server['request_uri'] ?? '/'); + if (\str_starts_with($path, '/.well-known/acme-challenge')) { + return false; + } + + $type = $route->getAttribute('resourceType'); + + if ($type === 'function') { + $functionId = $route->getAttribute('resourceId'); + $projectId = $route->getAttribute('projectId'); + + $path = ($swooleRequest->server['request_uri'] ?? '/'); + $query = ($swooleRequest->server['query_string'] ?? ''); + if (!empty($query)) { + $path .= '?' . $query; + } + + $body = \json_encode([ + 'async' => false, + 'body' => $swooleRequest->getContent() ?? '', + 'method' => $swooleRequest->server['request_method'], + 'path' => $path, + 'headers' => $swooleRequest->header + ]); + + $headers = [ + 'Content-Type: application/json', + 'Content-Length: ' . \strlen($body), + 'X-Appwrite-Project: ' . $projectId + ]; + + $ch = \curl_init(); + \curl_setopt($ch, CURLOPT_URL, "http://localhost/v1/functions/{$functionId}/executions"); + \curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); + \curl_setopt($ch, CURLOPT_POSTFIELDS, $body); + \curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + \curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + // \curl_setopt($ch, CURLOPT_HEADER, true); + \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + + $executionResponse = \curl_exec($ch); + $statusCode = \curl_getinfo($ch, CURLINFO_HTTP_CODE); + $error = \curl_error($ch); + $errNo = \curl_errno($ch); + + \curl_close($ch); + + if ($errNo !== 0) { + throw new AppwriteException(AppwriteException::GENERAL_ARGUMENT_INVALID, "Internal error: " . $error); + } + + if ($statusCode >= 400) { + $error = \json_decode($executionResponse, true)['message']; + throw new AppwriteException(AppwriteException::GENERAL_ARGUMENT_INVALID, "Execution error: " . $error); + } + + $execution = \json_decode($executionResponse, true); + + $contentType = 'text/plain'; + foreach ($execution['responseHeaders'] as $header) { + if (\strtolower($header['name']) === 'content-type') { + $contentType = $header['value']; + } + + $response->setHeader($header['name'], $header['value']); + } + + $body = $execution['responseBody'] ?? ''; + + $encodingKey = \array_search('x-open-runtimes-encoding', \array_column($execution['responseHeaders'], 'name')); + if ($encodingKey !== false) { + if (($execution['responseHeaders'][$encodingKey]['value'] ?? '') === 'base64') { + $body = \base64_decode($body); + } + } + + $response + ->setContentType($contentType) + ->setStatusCode($execution['responseStatusCode'] ?? 200) + ->send($body); + + return true; + } elseif ($type === 'api') { + return false; + } else { + throw new AppwriteException(AppwriteException::GENERAL_SERVER_ERROR, 'Unknown resource type ' . $type); + } + + return false; +} + App::init() - ->groups(['api']) + ->groups(['api', 'web']) ->inject('utopia') + ->inject('swooleRequest') ->inject('request') ->inject('response') ->inject('console') @@ -53,13 +185,30 @@ App::init() ->inject('localeCodes') ->inject('clients') ->inject('servers') - ->action(function (App $utopia, Request $request, Response $response, Document $console, Document $project, Database $dbForConsole, Document $user, Locale $locale, array $localeCodes, array $clients, array $servers) { + ->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Document $console, Document $project, Database $dbForConsole, Document $user, Locale $locale, array $localeCodes, array $clients, array $servers) { + /* + * Appwrite Router + */ + + $host = $request->getHostname() ?? ''; + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + // Only run Router when external domain + if ($host !== $mainDomain && $host !== 'localhost' && $host !== APP_HOSTNAME_INTERNAL) { + if (router($utopia, $dbForConsole, $swooleRequest, $request, $response)) { + return; + } + } + /* * Request format */ - $route = $utopia->match($request); + $route = $utopia->getRoute(); Request::setRoute($route); + if ($route === null) { + return $response->setStatusCode(404)->send('Not Found'); + } + $requestFormat = $request->getHeader('x-appwrite-response-format', App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); if ($requestFormat) { switch ($requestFormat) { @@ -75,6 +224,9 @@ App::init() case version_compare($requestFormat, '0.15.3', '<'): Request::setFilter(new RequestV15()); break; + case version_compare($requestFormat, '1.4.0', '<'): + Request::setFilter(new RequestV16()); + break; default: Request::setFilter(null); } @@ -82,60 +234,6 @@ App::init() Request::setFilter(null); } - $domain = $request->getHostname(); - $domains = Config::getParam('domains', []); - if (!array_key_exists($domain, $domains)) { - $domain = new Domain(!empty($domain) ? $domain : ''); - - if (empty($domain->get()) || !$domain->isKnown() || $domain->isTest()) { - $domains[$domain->get()] = false; - Console::warning($domain->get() . ' is not a publicly accessible domain. Skipping SSL certificate generation.'); - } elseif (str_starts_with($request->getURI(), '/.well-known/acme-challenge')) { - Console::warning('Skipping SSL certificates generation on ACME challenge.'); - } else { - Authorization::disable(); - - $envDomain = App::getEnv('_APP_DOMAIN', ''); - $mainDomain = null; - if (!empty($envDomain) && $envDomain !== 'localhost') { - $mainDomain = $envDomain; - } else { - $domainDocument = $dbForConsole->findOne('domains', [Query::orderAsc('_id')]); - $mainDomain = $domainDocument ? $domainDocument->getAttribute('domain') : $domain->get(); - } - - if ($mainDomain !== $domain->get()) { - Console::warning($domain->get() . ' is not a main domain. Skipping SSL certificate generation.'); - } else { - $domainDocument = $dbForConsole->findOne('domains', [ - Query::equal('domain', [$domain->get()]) - ]); - - if (!$domainDocument) { - $domainDocument = new Document([ - 'domain' => $domain->get(), - 'tld' => $domain->getSuffix(), - 'registerable' => $domain->getRegisterable(), - 'verification' => false, - 'certificateId' => null, - ]); - - $domainDocument = $dbForConsole->createDocument('domains', $domainDocument); - - Console::info('Issuing a TLS certificate for the main domain (' . $domain->get() . ') in a few seconds...'); - - (new Certificate()) - ->setDomain($domainDocument) - ->trigger(); - } - } - $domains[$domain->get()] = true; - - Authorization::reset(); // ensure authorization is re-enabled - } - Config::setParam('domains', $domains); - } - $localeParam = (string) $request->getParam('locale', $request->getHeader('x-appwrite-locale', '')); if (\in_array($localeParam, $localeCodes)) { $locale->setDefault($localeParam); @@ -172,7 +270,7 @@ App::init() Config::setParam( 'domainVerification', ($selfDomain->getRegisterable() === $endDomain->getRegisterable()) && - $endDomain->getRegisterable() !== '' + $endDomain->getRegisterable() !== '' ); $isLocalHost = $request->getHostname() === 'localhost' || $request->getHostname() === 'localhost:' . $request->getPort(); @@ -212,6 +310,9 @@ App::init() case version_compare($responseFormat, '0.15.3', '<='): Response::setFilter(new ResponseV15()); break; + case version_compare($responseFormat, '1.4.0', '<'): + Response::setFilter(new ResponseV16()); + break; default: Response::setFilter(null); } @@ -226,7 +327,7 @@ App::init() * @see https://www.owasp.org/index.php/List_of_useful_HTTP_headers */ if (App::getEnv('_APP_OPTIONS_FORCE_HTTPS', 'disabled') === 'enabled') { // Force HTTPS - if ($request->getProtocol() !== 'https') { + if ($request->getProtocol() !== 'https' && ($swooleRequest->header['host'] ?? '') !== 'localhost' && ($swooleRequest->header['host'] ?? '') !== APP_HOSTNAME_INTERNAL) { // Localhost allowed for proxy, APP_HOSTNAME_INTERNAL allowed for migrations if ($request->getMethod() !== Request::METHOD_GET) { throw new AppwriteException(AppwriteException::GENERAL_PROTOCOL_UNSUPPORTED, 'Method unsupported over HTTP.'); } @@ -246,8 +347,7 @@ App::init() ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma') ->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies') ->addHeader('Access-Control-Allow-Origin', $refDomain) - ->addHeader('Access-Control-Allow-Credentials', 'true') - ; + ->addHeader('Access-Control-Allow-Credentials', 'true'); /* * Validate Client Domain - Check to avoid CSRF attack @@ -274,7 +374,7 @@ App::init() : Role::users()->toString(); // Add user roles - $memberships = $user->find('teamId', $project->getAttribute('teamId', null), 'memberships'); + $memberships = $user->find('teamId', $project->getAttribute('teamId'), 'memberships'); if ($memberships) { foreach ($memberships->getAttribute('roles', []) as $memberRole) { @@ -320,7 +420,7 @@ App::init() $expire = $key->getAttribute('expire'); if (!empty($expire) && $expire < DateTime::formatTz(DateTime::now())) { - throw new AppwriteException(AppwriteException:: PROJECT_KEY_EXPIRED); + throw new AppwriteException(AppwriteException::PROJECT_KEY_EXPIRED); } Authorization::setRole(Auth::USER_ROLE_APPS); @@ -385,9 +485,23 @@ App::init() }); App::options() + ->inject('utopia') + ->inject('swooleRequest') ->inject('request') ->inject('response') - ->action(function (Request $request, Response $response) { + ->inject('dbForConsole') + ->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Database $dbForConsole) { + /* + * Appwrite Router + */ + $host = $request->getHostname() ?? ''; + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + // Only run Router when external domain + if ($host !== $mainDomain && $host !== 'localhost' && $host !== APP_HOSTNAME_INTERNAL) { + if (router($utopia, $dbForConsole, $swooleRequest, $request, $response)) { + return; + } + } $origin = $request->getOrigin(); @@ -412,7 +526,7 @@ App::error() ->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, array $loggerBreadcrumbs) { $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); - $route = $utopia->match($request); + $route = $utopia->getRoute(); if ($logger) { if ($error->getCode() >= 500 || $error->getCode() === 0) { @@ -548,8 +662,7 @@ App::error() ->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate') ->addHeader('Expires', '0') ->addHeader('Pragma', 'no-cache') - ->setStatusCode($code) - ; + ->setStatusCode($code); $template = ($route) ? $route->getLabel('error', null) : null; @@ -564,8 +677,7 @@ App::error() ->setParam('message', $error->getMessage()) ->setParam('type', $type) ->setParam('code', $code) - ->setParam('trace', $trace) - ; + ->setParam('trace', $trace); $response->html($layout->render()); } @@ -649,6 +761,13 @@ App::get('/.well-known/acme-challenge/*') include_once __DIR__ . '/shared/api.php'; include_once __DIR__ . '/shared/api/auth.php'; +App::wildcard() + ->groups(['api']) + ->label('scope', 'global') + ->action(function () { + throw new AppwriteException(AppwriteException::GENERAL_ROUTE_NOT_FOUND); + }); + foreach (Config::getParam('services', []) as $service) { include_once $service['controller']; } diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 892c41d872..a763df82c0 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -198,7 +198,6 @@ App::delete('/v1/mock/tests/bar') ->action(function ($required, $default, $z) { }); -/** Endpoint to test if required headers are sent from the SDK */ App::get('/v1/mock/tests/general/headers') ->desc('Get headers') ->groups(['mock']) @@ -443,35 +442,6 @@ App::post('/v1/mock/tests/general/nullable') ->action(function (string $required, string $nullable, ?string $optional) { }); -/** Endpoint to test if required headers are sent from the SDK */ -App::get('/v1/mock/tests/general/headers') - ->desc('Get headers') - ->groups(['mock']) - ->label('scope', 'public') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'general') - ->label('sdk.method', 'headers') - ->label('sdk.description', 'Return headers from the request') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_MOCK) - ->label('sdk.mock', true) - ->inject('request') - ->inject('response') - ->action(function (Request $request, Response $response) { - $res = [ - 'x-sdk-name' => $request->getHeader('x-sdk-name'), - 'x-sdk-platform' => $request->getHeader('x-sdk-platform'), - 'x-sdk-language' => $request->getHeader('x-sdk-language'), - 'x-sdk-version' => $request->getHeader('x-sdk-version'), - ]; - $res = array_map(function ($key, $value) { - return $key . ': ' . $value; - }, array_keys($res), $res); - $res = implode("; ", $res); - - $response->dynamic(new Document(['result' => $res]), Response::MODEL_MOCK); - }); - App::get('/v1/mock/tests/general/400-error') ->desc('400 Error') ->groups(['mock']) @@ -643,7 +613,7 @@ App::shutdown() ->action(function (App $utopia, Response $response, Request $request) { $result = []; - $route = $utopia->match($request); + $route = $utopia->getRoute(); $path = APP_STORAGE_CACHE . '/tests.json'; $tests = (\file_exists($path)) ? \json_decode(\file_get_contents($path), true) : []; diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 2bbac41811..9dd800b69b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -8,8 +8,8 @@ use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Event\Mail; use Appwrite\Extend\Exception; -use Appwrite\Event\Usage; use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Usage\Stats; use Appwrite\Utopia\Response; use Appwrite\Utopia\Request; use Utopia\App; @@ -48,99 +48,43 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject) { - - $value = 1; +$databaseListener = function (string $event, Document $document, Stats $usage) { + $multiplier = 1; if ($event === Database::EVENT_DOCUMENT_DELETE) { - $value = -1; + $multiplier = -1; } - switch (true) { - case $document->getCollection() === 'teams': - $queueForUsage - ->addMetric(METRIC_TEAMS, $value); // per project + $collection = $document->getCollection(); + switch ($collection) { + case 'users': + $usage->setParam('users.{scope}.count.total', 1 * $multiplier); break; - case $document->getCollection() === 'users': - $queueForUsage - ->addMetric(METRIC_USERS, $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } + case 'databases': + $usage->setParam('databases.{scope}.count.total', 1 * $multiplier); break; - case $document->getCollection() === 'sessions': // sessions - $queueForUsage - ->addMetric(METRIC_SESSIONS, $value); //per project + case 'buckets': + $usage->setParam('buckets.{scope}.count.total', 1 * $multiplier); break; - case $document->getCollection() === 'databases': // databases - $queueForUsage - ->addMetric(METRIC_DATABASES, $value); // per project - - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections - $parts = explode('_', $document->getCollection()); - $databaseInternalId = $parts[1] ?? 0; - $queueForUsage - ->addMetric(METRIC_COLLECTIONS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database - ; - - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents - $parts = explode('_', $document->getCollection()); - $databaseInternalId = $parts[1] ?? 0; - $collectionInternalId = $parts[3] ?? 0; - $queueForUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection - break; - case $document->getCollection() === 'buckets': //buckets - $queueForUsage - ->addMetric(METRIC_BUCKETS, $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case str_starts_with($document->getCollection(), 'bucket_'): // files - $queueForUsage - ->addMetric(METRIC_FILES, $value) // per project - ->addMetric(METRIC_FILES_STORAGE, $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric(str_replace('{bucketInternalId}', $document->getAttribute('bucketInternalId'), METRIC_BUCKET_ID_FILES), $value) // per bucket - ->addMetric(str_replace('{bucketInternalId}', $document->getAttribute('bucketInternalId'), METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket - break; - case $document->getCollection() === 'functions': - $queueForUsage - ->addMetric(METRIC_FUNCTIONS, $value); // per project - - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case $document->getCollection() === 'deployments': - $queueForUsage - ->addMetric(METRIC_DEPLOYMENTS, $value) // per project - ->addMetric(METRIC_DEPLOYMENTS_STORAGE, $document->getAttribute('size') * $value) // per project - ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function - ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE), $document->getAttribute('size') * $value);// per function - - break; - case $document->getCollection() === 'executions': - $queueForUsage - ->addMetric(METRIC_EXECUTIONS, $value) // per project - ->addMetric(str_replace('{functionInternalId}', $document->getAttribute('functionInternalId'), METRIC_FUNCTION_ID_EXECUTIONS), $value);// per function + case 'deployments': + $usage->setParam('deployments.{scope}.storage.size', $document->getAttribute('size') * $multiplier); break; default: + if (strpos($collection, 'bucket_') === 0) { + $usage + ->setParam('bucketId', $document->getAttribute('bucketId')) + ->setParam('files.{scope}.storage.size', $document->getAttribute('sizeOriginal') * $multiplier) + ->setParam('files.{scope}.count.total', 1 * $multiplier); + } elseif (strpos($collection, 'database_') === 0) { + $usage + ->setParam('databaseId', $document->getAttribute('databaseId')); + if (strpos($collection, '_collection_') !== false) { + $usage + ->setParam('collectionId', $document->getAttribute('$collectionId')) + ->setParam('documents.{scope}.count.total', 1 * $multiplier); + } else { + $usage->setParam('collections.{scope}.count.total', 1 * $multiplier); + } + } break; } }; @@ -157,12 +101,12 @@ App::init() ->inject('deletes') ->inject('database') ->inject('dbForProject') - ->inject('queueForUsage') ->inject('mode') ->inject('mails') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Usage $queueForUsage, string $mode, Mail $mails) use ($databaseListener) { + ->inject('usage') + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode, Mail $mails, Stats $usage) use ($databaseListener) { - $route = $utopia->match($request); + $route = $utopia->getRoute(); if ($project->isEmpty() && $route->getLabel('abuse-limit', 0) > 0) { // Abuse limit requires an active project scope throw new Exception(Exception::PROJECT_UNKNOWN); @@ -242,25 +186,19 @@ App::init() ->setProject($project) ->setUser($user); - $smtp = $project->getAttribute('smtp', []); - if (!empty($smtp) && ($smtp['enabled'] ?? false)) { - $mails - ->setSmtpHost($smtp['host'] ?? '') - ->setSmtpPort($smtp['port'] ?? 25) - ->setSmtpUsername($smtp['username'] ?? '') - ->setSmtpPassword($smtp['password'] ?? '') - ->setSmtpSenderEmail($smtp['sender'] ?? '') - ->setSmtpReplyTo($smtp['replyTo'] ?? ''); - } + $usage + ->setParam('projectInternalId', $project->getInternalId()) + ->setParam('projectId', $project->getId()) + ->setParam('project.{scope}.network.requests', 1) + ->setParam('httpMethod', $request->getMethod()) + ->setParam('project.{scope}.network.inbound', 0) + ->setParam('project.{scope}.network.outbound', 0); $deletes->setProject($project); $database->setProject($project); - $calculateUsage = fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject); - - $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', $calculateUsage) - ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', $calculateUsage); + $dbForProject->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, Document $document) => $databaseListener($event, $document, $usage)); + $dbForProject->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, Document $document) => $databaseListener($event, $document, $usage)); $useCache = $route->getLabel('cache', false); @@ -282,7 +220,10 @@ App::init() $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); - if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } @@ -328,7 +269,7 @@ App::init() ->inject('project') ->action(function (App $utopia, Request $request, Document $project) { - $route = $utopia->match($request); + $route = $utopia->getRoute(); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); $isAppUser = Auth::isAppUser(Authorization::getRoles()); @@ -423,14 +364,14 @@ App::shutdown() ->inject('user') ->inject('events') ->inject('audits') + ->inject('usage') ->inject('deletes') ->inject('database') ->inject('dbForProject') ->inject('queueForFunctions') - ->inject('queueForUsage') ->inject('mode') ->inject('dbForConsole') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions, Usage $queueForUsage, string $mode, Database $dbForConsole) use ($parseLabel) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Stats $usage, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions, string $mode, Database $dbForConsole) use ($parseLabel) { $responsePayload = $response->getPayload(); @@ -489,7 +430,7 @@ App::shutdown() } } - $route = $utopia->match($request); + $route = $utopia->getRoute(); $requestParams = $route->getParamsValues(); /** @@ -583,48 +524,35 @@ App::shutdown() } } + if ( + App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled' + && $project->getId() + && !empty($route->getLabel('sdk.namespace', null)) + ) { // Don't calculate console usage on admin mode + $metric = $route->getLabel('usage.metric', ''); + $usageParams = $route->getLabel('usage.params', []); - - if ($project->getId() !== 'console') { - if ($mode !== APP_MODE_ADMIN) { - $fileSize = 0; - $file = $request->getFiles('file'); - if (!empty($file)) { - $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; - } - - $queueForUsage - ->addMetric(METRIC_NETWORK_REQUESTS, 1) - ->addMetric(METRIC_NETWORK_INBOUND, $request->getSize() + $fileSize) - ->addMetric(METRIC_NETWORK_OUTBOUND, $response->getSize()); - } - - $queueForUsage - ->setProject($project) - ->trigger(); - } - - /** - * Update user last activity - */ - if (!$user->isEmpty()) { - $accessedAt = $user->getAttribute('accessedAt', ''); - if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_USER_ACCCESS)) > $accessedAt) { - $user->setAttribute('accessedAt', DateTime::now()); - - if (APP_MODE_ADMIN !== $mode) { - $dbForProject->updateDocument('users', $user->getId(), $user); - } else { - $dbForConsole->updateDocument('users', $user->getId(), $user); + if (!empty($metric)) { + $usage->setParam($metric, 1); + foreach ($usageParams as $param) { + $param = $parseLabel($param, $responsePayload, $requestParams, $user); + $parts = explode(':', $param); + if (count($parts) != 2) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Usage params not properly set'); + } + $usage->setParam($parts[0], $parts[1]); } } - } - }); -App::init() - ->groups(['usage']) - ->action(function () { - if (App::getEnv('_APP_USAGE_STATS', 'enabled') !== 'enabled') { - throw new Exception(Exception::GENERAL_USAGE_DISABLED); + $fileSize = 0; + $file = $request->getFiles('file'); + if (!empty($file)) { + $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; + } + + $usage + ->setParam('project.{scope}.network.inbound', $request->getSize() + $fileSize) + ->setParam('project.{scope}.network.outbound', $response->getSize()) + ->submit(); } }); diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index dcf9c80a51..d7496b03bd 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -1,5 +1,6 @@ inject('request') ->inject('response') ->action(function (Request $request, Response $response) { + // Serve static files (console) only for main domain + $host = $request->getHostname() ?? ''; + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + if ($host !== $mainDomain && $host !== 'localhost' && $host !== APP_HOSTNAME_INTERNAL) { + throw new Exception(Exception::GENERAL_ROUTE_NOT_FOUND); + } + $fallback = file_get_contents(__DIR__ . '/../../../console/index.html'); // Card SSR diff --git a/app/controllers/web/home.php b/app/controllers/web/home.php index e90f3ec25b..27b2614c37 100644 --- a/app/controllers/web/home.php +++ b/app/controllers/web/home.php @@ -6,7 +6,7 @@ use Utopia\Config\Config; App::get('/versions') ->desc('Get Version') - ->groups(['home']) + ->groups(['home', 'web']) ->label('scope', 'public') ->inject('response') ->action(function (Response $response) { diff --git a/app/http.php b/app/http.php index 8ce7b6f017..053db20ffc 100644 --- a/app/http.php +++ b/app/http.php @@ -61,8 +61,9 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { $app = new App('UTC'); go(function () use ($register, $app) { - $pools = $register->get('pools'); /** @var Group $pools */ - App::setResource('pools', fn() => $pools); + $pools = $register->get('pools'); + /** @var Group $pools */ + App::setResource('pools', fn () => $pools); // wait for database to be ready $attempts = 0; @@ -72,7 +73,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { do { try { $attempts++; - $dbForConsole = $app->getResource('dbForConsole'); /** @var Utopia\Database\Database $dbForConsole */ + $dbForConsole = $app->getResource('dbForConsole'); + /** @var Utopia\Database\Database $dbForConsole */ break; // leave the do-while if successful } catch (\Exception $e) { Console::warning("Database not ready. Retrying connection ({$attempts})..."); @@ -221,25 +223,33 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { }); $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swooleResponse) use ($register) { + App::setResource('swooleRequest', fn () => $swooleRequest); + App::setResource('swooleResponse', fn () => $swooleResponse); + $request = new Request($swooleRequest); $response = new Response($swooleResponse); - if (Files::isFileLoaded($request->getURI())) { - $time = (60 * 60 * 24 * 365 * 2); // 45 days cache + // Serve static files (console) only for main domain + $host = $request->getHostname() ?? ''; + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + if ($host === $mainDomain || $host === 'localhost') { + if (Files::isFileLoaded($request->getURI())) { + $time = (60 * 60 * 24 * 365 * 2); // 45 days cache - $response - ->setContentType(Files::getFileMimeType($request->getURI())) - ->addHeader('Cache-Control', 'public, max-age=' . $time) - ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $time) . ' GMT') // 45 days cache - ->send(Files::getFileContents($request->getURI())); + $response + ->setContentType(Files::getFileMimeType($request->getURI())) + ->addHeader('Cache-Control', 'public, max-age=' . $time) + ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $time) . ' GMT') // 45 days cache + ->send(Files::getFileContents($request->getURI())); - return; + return; + } } $app = new App('UTC'); $pools = $register->get('pools'); - App::setResource('pools', fn() => $pools); + App::setResource('pools', fn () => $pools); try { Authorization::cleanRoles(); @@ -259,7 +269,7 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo } $loggerBreadcrumbs = $app->getResource("loggerBreadcrumbs"); - $route = $app->match($request); + $route = $app->getRoute(); $log = new Utopia\Logger\Log(); diff --git a/app/init.php b/app/init.php index 9f3d41ba0a..f2d7bc7db4 100644 --- a/app/init.php +++ b/app/init.php @@ -32,6 +32,7 @@ use Appwrite\Network\Validator\Email; use Appwrite\Network\Validator\Origin; use Appwrite\OpenSSL\OpenSSL; use Appwrite\URL\URL as AppwriteURL; +use Appwrite\Usage\Stats; use Utopia\App; use Utopia\Logger\Logger; use Utopia\Cache\Adapter\Redis as RedisCache; @@ -68,6 +69,7 @@ use Utopia\Pools\Group; use Utopia\Pools\Pool; use Ahc\Jwt\JWT; use Ahc\Jwt\JWTException; +use Appwrite\Auth\OAuth2\Github; use Appwrite\Event\Func; use MaxMind\Db\Reader; use PHPMailer\PHPMailer\PHPMailer; @@ -75,6 +77,7 @@ use Swoole\Database\PDOProxy; use Utopia\Queue; use Utopia\Queue\Connection; use Utopia\Storage\Storage; +use Utopia\VCS\Adapter\Git\GitHub as VcsGitHub; use Utopia\Validator\Range; use Utopia\Validator\IP; use Utopia\Validator\URL; @@ -105,8 +108,8 @@ const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours -const APP_CACHE_BUSTER = 506; -const APP_VERSION_STABLE = '1.3.8'; +const APP_CACHE_BUSTER = 508; +const APP_VERSION_STABLE = '1.4.1'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; @@ -133,6 +136,7 @@ const APP_SOCIAL_DISCORD_CHANNEL = '564160730845151244'; const APP_SOCIAL_DEV = 'https://dev.to/appwrite'; const APP_SOCIAL_STACKSHARE = 'https://stackshare.io/appwrite'; const APP_SOCIAL_YOUTUBE = 'https://www.youtube.com/c/appwrite?sub_confirmation=1'; +const APP_HOSTNAME_INTERNAL = 'appwrite'; // Database Reconnect const DATABASE_RECONNECT_SLEEP = 2; const DATABASE_RECONNECT_MAX_ATTEMPTS = 10; @@ -156,10 +160,11 @@ const DELETE_TYPE_TEAMS = 'teams'; const DELETE_TYPE_EXECUTIONS = 'executions'; const DELETE_TYPE_AUDIT = 'audit'; const DELETE_TYPE_ABUSE = 'abuse'; -const DELETE_TYPE_CERTIFICATES = 'certificates'; const DELETE_TYPE_USAGE = 'usage'; const DELETE_TYPE_REALTIME = 'realtime'; const DELETE_TYPE_BUCKETS = 'buckets'; +const DELETE_TYPE_INSTALLATIONS = 'installations'; +const DELETE_TYPE_RULES = 'rules'; const DELETE_TYPE_SESSIONS = 'sessions'; const DELETE_TYPE_CACHE_BY_TIMESTAMP = 'cacheByTimeStamp'; const DELETE_TYPE_CACHE_BY_RESOURCE = 'cacheByResource'; @@ -181,6 +186,9 @@ const APP_AUTH_TYPE_KEY = 'Key'; const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB +// Function headers +const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host']; +const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length']; // Usage metrics const METRIC_TEAMS = 'teams'; const METRIC_USERS = 'users'; @@ -229,7 +237,6 @@ Config::load('providers', __DIR__ . '/config/providers.php'); Config::load('platforms', __DIR__ . '/config/platforms.php'); Config::load('collections', __DIR__ . '/config/collections.php'); Config::load('runtimes', __DIR__ . '/config/runtimes.php'); -Config::load('usage', __DIR__ . '/config/usage.php'); Config::load('roles', __DIR__ . '/config/roles.php'); // User roles and scopes Config::load('scopes', __DIR__ . '/config/scopes.php'); // User roles and scopes Config::load('services', __DIR__ . '/config/services.php'); // List of services @@ -286,7 +293,7 @@ Database::addFilter( return $value; }, function (mixed $value, Document $attribute) { - $formatOptions = json_decode($attribute->getAttribute('formatOptions', '[]'), true); + $formatOptions = \json_decode($attribute->getAttribute('formatOptions', '[]'), true); if (isset($formatOptions['elements'])) { $attribute->setAttribute('elements', $formatOptions['elements']); } @@ -356,7 +363,7 @@ Database::addFilter( ->find('indexes', [ Query::equal('collectionInternalId', [$document->getInternalId()]), Query::equal('databaseInternalId', [$document->getAttribute('databaseInternalId')]), - Query::limit(64), + Query::limit($database->getLimitForIndexes()), ]); } ); @@ -375,20 +382,6 @@ Database::addFilter( } ); -Database::addFilter( - 'subQueryDomains', - function (mixed $value) { - return null; - }, - function (mixed $value, Document $document, Database $database) { - return $database - ->find('domains', [ - Query::equal('projectInternalId', [$document->getInternalId()]), - Query::limit(APP_LIMIT_SUBQUERY), - ]); - } -); - Database::addFilter( 'subQueryKeys', function (mixed $value) { @@ -466,7 +459,8 @@ Database::addFilter( function (mixed $value, Document $document, Database $database) { return $database ->find('variables', [ - Query::equal('functionInternalId', [$document->getInternalId()]), + Query::equal('resourceInternalId', [$document->getInternalId()]), + Query::equal('resourceType', ['function']), Query::limit(APP_LIMIT_SUBQUERY), ]); } @@ -498,6 +492,21 @@ Database::addFilter( } ); +// READ-ONLY! TO update, write directly to 'variables' collection. After update to vars, make sure to deleteCachedDocument() +Database::addFilter( + 'subQueryProjectVariables', + function (mixed $value) { + return null; + }, + function (mixed $value, Document $document, Database $database) { + return $database + ->find('variables', [ + Query::equal('resourceType', ['project']), + Query::limit(APP_LIMIT_SUBQUERY) + ]); + } +); + Database::addFilter( 'userSearch', function (mixed $value, Document $user) { @@ -593,14 +602,15 @@ $register->set('logger', function () { $register->set('pools', function () { $group = new Group(); - $fallbackForDB = AppwriteURL::unparse([ + $fallbackForDB = 'db_main=' . AppwriteURL::unparse([ 'scheme' => 'mariadb', 'host' => App::getEnv('_APP_DB_HOST', 'mariadb'), 'port' => App::getEnv('_APP_DB_PORT', '3306'), 'user' => App::getEnv('_APP_DB_USER', ''), 'pass' => App::getEnv('_APP_DB_PASS', ''), + 'path' => App::getEnv('_APP_DB_SCHEMA', ''), ]); - $fallbackForRedis = AppwriteURL::unparse([ + $fallbackForRedis = 'redis_main=' . AppwriteURL::unparse([ 'scheme' => 'redis', 'host' => App::getEnv('_APP_REDIS_HOST', 'redis'), 'port' => App::getEnv('_APP_REDIS_PORT', '6379'), @@ -774,21 +784,46 @@ $register->set('pools', function () { return $group; }); +$register->set('influxdb', function () { + + // Register DB connection + $host = App::getEnv('_APP_INFLUXDB_HOST', ''); + $port = App::getEnv('_APP_INFLUXDB_PORT', ''); + + if (empty($host) || empty($port)) { + return; + } + $driver = new InfluxDB\Driver\Curl("http://{$host}:{$port}"); + $client = new InfluxDB\Client($host, $port, '', '', false, false, 5); + $client->setDriver($driver); + + return $client; +}); +$register->set('statsd', function () { + // Register DB connection + $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); + $port = App::getEnv('_APP_STATSD_PORT', 8125); + + $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); + $statsd = new \Domnikl\Statsd\Client($connection); + + return $statsd; +}); $register->set('smtp', function () { $mail = new PHPMailer(true); $mail->isSMTP(); - $username = App::getEnv('_APP_SMTP_USERNAME', null); - $password = App::getEnv('_APP_SMTP_PASSWORD', null); + $username = App::getEnv('_APP_SMTP_USERNAME'); + $password = App::getEnv('_APP_SMTP_PASSWORD'); $mail->XMailer = 'Appwrite Mailer'; $mail->Host = App::getEnv('_APP_SMTP_HOST', 'smtp'); $mail->Port = App::getEnv('_APP_SMTP_PORT', 25); - $mail->SMTPAuth = (!empty($username) && !empty($password)); + $mail->SMTPAuth = !empty($username) && !empty($password); $mail->Username = $username; $mail->Password = $password; - $mail->SMTPSecure = App::getEnv('_APP_SMTP_SECURE', false); + $mail->SMTPSecure = App::getEnv('_APP_SMTP_SECURE', ''); $mail->SMTPAutoTLS = false; $mail->CharSet = 'UTF-8'; @@ -877,9 +912,9 @@ App::setResource('queue', function (Group $pools) { App::setResource('queueForFunctions', function (Connection $queue) { return new Func($queue); }, ['queue']); -App::setResource('queueForUsage', function (Connection $queue) { - return new Usage($queue); -}, ['queue']); +App::setResource('usage', function ($register) { + return new Stats($register->get('statsd')); +}, ['register']); App::setResource('clients', function ($request, $console, $project) { $console->setAttribute('platforms', [ // Always allow current host '$collection' => ID::custom('platforms'), @@ -962,7 +997,11 @@ App::setResource('user', function ($mode, $project, $console, $request, $respons if ($project->isEmpty()) { $user = new Document([]); } else { - $user = $dbForProject->getDocument('users', Auth::$unique); + if ($project->getId() === 'console') { + $user = $dbForConsole->getDocument('users', Auth::$unique); + } else { + $user = $dbForProject->getDocument('users', Auth::$unique); + } } } else { $user = $dbForConsole->getDocument('users', Auth::$unique); @@ -1016,7 +1055,7 @@ App::setResource('project', function ($dbForConsole, $request, $console) { $projectId = $request->getParam('project', $request->getHeader('x-appwrite-project', '')); - if ($projectId === 'console') { + if (empty($projectId) || $projectId === 'console') { return $console; } @@ -1091,11 +1130,44 @@ App::setResource('dbForConsole', function (Group $pools, Cache $cache) { $database = new Database($dbAdapter, $cache); - $database->setNamespace('console'); + $database->setNamespace('_console'); return $database; }, ['pools', 'cache']); +App::setResource('getProjectDB', function (Group $pools, Database $dbForConsole, $cache) { + $databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools + + $getProjectDB = function (Document $project) use ($pools, $dbForConsole, $cache, &$databases) { + if ($project->isEmpty() || $project->getId() === 'console') { + return $dbForConsole; + } + + $databaseName = $project->getAttribute('database'); + + if (isset($databases[$databaseName])) { + $database = $databases[$databaseName]; + $database->setNamespace('_' . $project->getInternalId()); + return $database; + } + + $dbAdapter = $pools + ->get($databaseName) + ->pop() + ->getResource(); + + $database = new Database($dbAdapter, $cache); + + $databases[$databaseName] = $database; + + $database->setNamespace('_' . $project->getInternalId()); + + return $database; + }; + + return $getProjectDB; +}, ['pools', 'dbForConsole', 'cache']); + App::setResource('cache', function (Group $pools) { $list = Config::getParam('pools-cache', []); $adapters = []; @@ -1131,38 +1203,81 @@ function getDevice($root): Device { $connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); - $acl = 'private'; - $device = Storage::DEVICE_LOCAL; - $accessKey = ''; - $accessSecret = ''; - $bucket = ''; - $region = ''; + if (!empty($connection)) { + $acl = 'private'; + $device = Storage::DEVICE_LOCAL; + $accessKey = ''; + $accessSecret = ''; + $bucket = ''; + $region = ''; - try { - $dsn = new DSN($connection); - $device = $dsn->getScheme(); - $accessKey = $dsn->getUser(); - $accessSecret = $dsn->getPassword(); - $bucket = $dsn->getPath(); - $region = $dsn->getParam('region'); - } catch (\Exception $e) { - Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.'); - } + try { + $dsn = new DSN($connection); + $device = $dsn->getScheme(); + $accessKey = $dsn->getUser() ?? ''; + $accessSecret = $dsn->getPassword() ?? ''; + $bucket = $dsn->getPath() ?? ''; + $region = $dsn->getParam('region'); + } catch (\Exception $e) { + Console::warning($e->getMessage() . 'Invalid DSN. Defaulting to Local device.'); + } - switch ($device) { - case Storage::DEVICE_S3: - return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case STORAGE::DEVICE_DO_SPACES: - return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_BACKBLAZE: - return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_LINODE: - return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_WASABI: - return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_LOCAL: - default: - return new Local($root); + switch ($device) { + case Storage::DEVICE_S3: + return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case STORAGE::DEVICE_DO_SPACES: + return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_BACKBLAZE: + return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_LINODE: + return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_WASABI: + return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_LOCAL: + default: + return new Local($root); + } + } else { + switch (strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL) ?? '')) { + case Storage::DEVICE_LOCAL: + default: + return new Local($root); + case Storage::DEVICE_S3: + $s3AccessKey = App::getEnv('_APP_STORAGE_S3_ACCESS_KEY', ''); + $s3SecretKey = App::getEnv('_APP_STORAGE_S3_SECRET', ''); + $s3Region = App::getEnv('_APP_STORAGE_S3_REGION', ''); + $s3Bucket = App::getEnv('_APP_STORAGE_S3_BUCKET', ''); + $s3Acl = 'private'; + return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl); + case Storage::DEVICE_DO_SPACES: + $doSpacesAccessKey = App::getEnv('_APP_STORAGE_DO_SPACES_ACCESS_KEY', ''); + $doSpacesSecretKey = App::getEnv('_APP_STORAGE_DO_SPACES_SECRET', ''); + $doSpacesRegion = App::getEnv('_APP_STORAGE_DO_SPACES_REGION', ''); + $doSpacesBucket = App::getEnv('_APP_STORAGE_DO_SPACES_BUCKET', ''); + $doSpacesAcl = 'private'; + return new DOSpaces($root, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl); + case Storage::DEVICE_BACKBLAZE: + $backblazeAccessKey = App::getEnv('_APP_STORAGE_BACKBLAZE_ACCESS_KEY', ''); + $backblazeSecretKey = App::getEnv('_APP_STORAGE_BACKBLAZE_SECRET', ''); + $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); + $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); + $backblazeAcl = 'private'; + return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + case Storage::DEVICE_LINODE: + $linodeAccessKey = App::getEnv('_APP_STORAGE_LINODE_ACCESS_KEY', ''); + $linodeSecretKey = App::getEnv('_APP_STORAGE_LINODE_SECRET', ''); + $linodeRegion = App::getEnv('_APP_STORAGE_LINODE_REGION', ''); + $linodeBucket = App::getEnv('_APP_STORAGE_LINODE_BUCKET', ''); + $linodeAcl = 'private'; + return new Linode($root, $linodeAccessKey, $linodeSecretKey, $linodeBucket, $linodeRegion, $linodeAcl); + case Storage::DEVICE_WASABI: + $wasabiAccessKey = App::getEnv('_APP_STORAGE_WASABI_ACCESS_KEY', ''); + $wasabiSecretKey = App::getEnv('_APP_STORAGE_WASABI_SECRET', ''); + $wasabiRegion = App::getEnv('_APP_STORAGE_WASABI_REGION', ''); + $wasabiBucket = App::getEnv('_APP_STORAGE_WASABI_BUCKET', ''); + $wasabiAcl = 'private'; + return new Wasabi($root, $wasabiAccessKey, $wasabiSecretKey, $wasabiBucket, $wasabiRegion, $wasabiAcl); + } } } @@ -1305,22 +1420,26 @@ App::setResource('schema', function ($utopia, $dbForProject) { }, ['utopia', 'dbForProject']); App::setResource('contributors', function () { - $path = 'app/config/cloud/contributors.json'; + $path = 'app/config/contributors.json'; $list = (file_exists($path)) ? json_decode(file_get_contents($path), true) : []; return $list; -}, []); +}); App::setResource('employees', function () { - $path = 'app/config/cloud/employees.json'; + $path = 'app/config/employees.json'; $list = (file_exists($path)) ? json_decode(file_get_contents($path), true) : []; return $list; -}, []); +}); App::setResource('heroes', function () { - $path = 'app/config/cloud/heroes.json'; + $path = 'app/config/heroes.json'; $list = (file_exists($path)) ? json_decode(file_get_contents($path), true) : []; return $list; -}, []); +}); + +App::setResource('gitHub', function (Cache $cache) { + return new VcsGitHub($cache); +}, ['cache']); App::setResource('requestTimestamp', function ($request) { //TODO: Move this to the Request class itself diff --git a/app/realtime.php b/app/realtime.php index 772eee49d6..25b0532b42 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -47,7 +47,7 @@ function getConsoleDB(): Database $database = new Database($dbAdapter, getCache()); - $database->setNamespace('console'); + $database->setNamespace('_console'); return $database; } diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 6a07b07822..4cbfc2fd1a 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -30,15 +30,6 @@ services: ports: - :80 - :443 - ulimits: - nofile: - soft: 655350 - hard: 655350 - sysctls: - - net.core.somaxconn=1024 - - net.ipv4.tcp_rmem=1024 4096 16384 - - net.ipv4.tcp_wmem=1024 4096 16384 - - net.ipv4.ip_local_port_range=1025 65535 volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-config:/storage/config:ro @@ -80,6 +71,7 @@ services: - mariadb - redis # - clamav + - influxdb environment: - _APP_ENV - _APP_WORKER_PER_CORE @@ -87,8 +79,6 @@ services: - _APP_CONSOLE_WHITELIST_ROOT - _APP_CONSOLE_WHITELIST_EMAILS - _APP_CONSOLE_WHITELIST_IPS - - _APP_CONSOLE_INVITES - - _APP_CONSOLE_ROOT_SESSION - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS @@ -98,28 +88,50 @@ services: - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_DOMAIN_FUNCTIONS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_MAX - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE - _APP_SMTP_USERNAME - _APP_SMTP_PASSWORD - _APP_USAGE_STATS + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT - _APP_STORAGE_LIMIT - _APP_STORAGE_PREVIEW_LIMIT - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT - - _APP_CONNECTIONS_STORAGE + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_FUNCTIONS_SIZE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_BUILD_TIMEOUT @@ -130,6 +142,8 @@ services: - _APP_EXECUTOR_HOST - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + - _APP_STATSD_HOST + - _APP_STATSD_PORT - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE @@ -142,6 +156,15 @@ services: - _APP_GRAPHQL_MAX_BATCH_SIZE - _APP_GRAPHQL_MAX_COMPLEXITY - _APP_GRAPHQL_MAX_DEPTH + - _APP_VCS_GITHUB_APP_NAME + - _APP_VCS_GITHUB_PRIVATE_KEY + - _APP_VCS_GITHUB_APP_ID + - _APP_VCS_GITHUB_WEBHOOK_SECRET + - _APP_VCS_GITHUB_CLIENT_SECRET + - _APP_VCS_GITHUB_CLIENT_ID + - _APP_MIGRATIONS_FIREBASE_CLIENT_ID + - _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET + - _APP_ASSISTANT_OPENAI_API_KEY appwrite-realtime: image: /: @@ -174,16 +197,15 @@ services: - _APP_WORKER_PER_CORE - _APP_OPTIONS_ABUSE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_MAX - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_USAGE_STATS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -201,16 +223,17 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -227,6 +250,7 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST @@ -255,17 +279,38 @@ services: - appwrite-certificates:/storage/certificates:rw environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_STORAGE + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET @@ -284,16 +329,17 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -310,20 +356,30 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + - _APP_VCS_GITHUB_APP_NAME + - _APP_VCS_GITHUB_PRIVATE_KEY + - _APP_VCS_GITHUB_APP_ID + - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CPUS + - _APP_FUNCTIONS_MEMORY + - _APP_OPTIONS_FORCE_HTTPS + - _APP_DOMAIN appwrite-worker-certificates: image: /: @@ -341,19 +397,21 @@ services: - appwrite-certificates:/storage/certificates:rw environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_DOMAIN_FUNCTIONS - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -371,20 +429,28 @@ services: - openruntimes-executor environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CPUS + - _APP_FUNCTIONS_MEMORY - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST - _APP_USAGE_STATS + - _APP_DOCKER_HUB_USERNAME + - _APP_DOCKER_HUB_PASSWORD + - _APP_LOGGING_CONFIG + - _APP_LOGGING_PROVIDER appwrite-worker-mails: image: /: @@ -398,6 +464,7 @@ services: - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS @@ -425,6 +492,7 @@ services: - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER @@ -446,24 +514,57 @@ services: - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_DOMAIN_FUNCTIONS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE - _APP_MAINTENANCE_RETENTION_ABUSE - _APP_MAINTENANCE_RETENTION_AUDIT - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY + - _APP_MAINTENANCE_RETENTION_SCHEDULES + + appwrite-usage: + image: /: + entrypoint: usage + container_name: appwrite-usage + <<: *x-logging + restart: unless-stopped + networks: + - appwrite + depends_on: + - influxdb + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT + - _APP_USAGE_AGGREGATION_INTERVAL + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_LOGGING_PROVIDER + - _APP_LOGGING_CONFIG appwrite-schedule: image: /: @@ -477,17 +578,23 @@ services: - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS openruntimes-executor: container_name: openruntimes-executor - hostname: exc1 + hostname: executor <<: *x-logging stop_signal: SIGINT - image: openruntimes/executor:0.1.4 + image: openruntimes/executor:0.3.5 networks: - appwrite - runtimes @@ -497,7 +604,6 @@ services: - appwrite-functions:/storage/functions:rw - /tmp:/tmp:rw environment: - - OPR_EXECUTOR_CONNECTION_STORAGE=$_APP_CONNECTIONS_STORAGE - OPR_EXECUTOR_INACTIVE_TRESHOLD=$_APP_FUNCTIONS_INACTIVE_THRESHOLD - OPR_EXECUTOR_MAINTENANCE_INTERVAL=$_APP_FUNCTIONS_MAINTENANCE_INTERVAL - OPR_EXECUTOR_NETWORK=$_APP_FUNCTIONS_RUNTIMES_NETWORK @@ -508,6 +614,27 @@ services: - OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET - OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER - OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG + - OPR_EXECUTOR_STORAGE_DEVICE=$_APP_STORAGE_DEVICE + - OPR_EXECUTOR_STORAGE_S3_ACCESS_KEY=$_APP_STORAGE_S3_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_S3_SECRET=$_APP_STORAGE_S3_SECRET + - OPR_EXECUTOR_STORAGE_S3_REGION=$_APP_STORAGE_S3_REGION + - OPR_EXECUTOR_STORAGE_S3_BUCKET=$_APP_STORAGE_S3_BUCKET + - OPR_EXECUTOR_STORAGE_DO_SPACES_ACCESS_KEY=$_APP_STORAGE_DO_SPACES_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_DO_SPACES_SECRET=$_APP_STORAGE_DO_SPACES_SECRET + - OPR_EXECUTOR_STORAGE_DO_SPACES_REGION=$_APP_STORAGE_DO_SPACES_REGION + - OPR_EXECUTOR_STORAGE_DO_SPACES_BUCKET=$_APP_STORAGE_DO_SPACES_BUCKET + - OPR_EXECUTOR_STORAGE_BACKBLAZE_ACCESS_KEY=$_APP_STORAGE_BACKBLAZE_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_BACKBLAZE_SECRET=$_APP_STORAGE_BACKBLAZE_SECRET + - OPR_EXECUTOR_STORAGE_BACKBLAZE_REGION=$_APP_STORAGE_BACKBLAZE_REGION + - OPR_EXECUTOR_STORAGE_BACKBLAZE_BUCKET=$_APP_STORAGE_BACKBLAZE_BUCKET + - OPR_EXECUTOR_STORAGE_LINODE_ACCESS_KEY=$_APP_STORAGE_LINODE_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_LINODE_SECRET=$_APP_STORAGE_LINODE_SECRET + - OPR_EXECUTOR_STORAGE_LINODE_REGION=$_APP_STORAGE_LINODE_REGION + - OPR_EXECUTOR_STORAGE_LINODE_BUCKET=$_APP_STORAGE_LINODE_BUCKET + - OPR_EXECUTOR_STORAGE_WASABI_ACCESS_KEY=$_APP_STORAGE_WASABI_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_WASABI_SECRET=$_APP_STORAGE_WASABI_SECRET + - OPR_EXECUTOR_STORAGE_WASABI_REGION=$_APP_STORAGE_WASABI_REGION + - OPR_EXECUTOR_STORAGE_WASABI_BUCKET=$_APP_STORAGE_WASABI_BUCKET mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p @@ -523,7 +650,7 @@ services: - MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_USER=${_APP_DB_USER} - MYSQL_PASSWORD=${_APP_DB_PASS} - command: 'mysqld --innodb-flush-method=fsync --max_connections=${_APP_CONNECTIONS_MAX}' + command: 'mysqld --innodb-flush-method=fsync' redis: image: redis:7.0.4-alpine @@ -549,41 +676,26 @@ services: # volumes: # - appwrite-uploads:/storage/uploads - appwrite-worker-usage: - image: /: - entrypoint: worker-usage + influxdb: + image: appwrite/influxdb:1.5.0 + container_name: appwrite-influxdb <<: *x-logging - container_name: appwrite-worker-usage + restart: unless-stopped networks: - appwrite volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - depends_on: - - redis - - mariadb + - appwrite-influxdb:/var/lib/influxdb:rw + + telegraf: + image: appwrite/telegraf:1.4.0 + container_name: appwrite-telegraf + <<: *x-logging + restart: unless-stopped + networks: + - appwrite environment: - - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_USAGE_STATS - - _APP_LOGGING_PROVIDER - - _APP_LOGGING_CONFIG + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT networks: gateway: @@ -599,6 +711,7 @@ volumes: appwrite-cache: appwrite-uploads: appwrite-certificates: - appwrite-config: appwrite-functions: appwrite-builds: + appwrite-influxdb: + appwrite-config: diff --git a/app/worker.php b/app/worker.php index ea086fa43d..51e42969f4 100644 --- a/app/worker.php +++ b/app/worker.php @@ -4,14 +4,17 @@ require_once __DIR__ . '/init.php'; use Appwrite\Event\Func; use Appwrite\Event\Usage; +use Appwrite\Usage\Stats; use Swoole\Runtime; use Utopia\App; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; +use Utopia\CLI\CLI; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; +use Utopia\Database\Validator\Authorization; use Utopia\Queue\Adapter\Swoole; use Utopia\Queue\Message; use Utopia\Queue\Server; @@ -35,7 +38,7 @@ Server::setResource('dbForConsole', function (Cache $cache, Registry $register) ; $adapter = new Database($database, $cache); - $adapter->setNamespace('console'); + $adapter->setNamespace('_console'); return $adapter; }, ['cache', 'register']); @@ -86,22 +89,16 @@ Server::setResource('queueForFunctions', function (Registry $register) { ); }, ['register']); -Server::setResource('queueForUsage', function (Registry $register) { - $pools = $register->get('pools'); - return new Usage( - $pools - ->get('queue') - ->pop() - ->getResource() - ); -}, ['register']); - Server::setResource('log', fn() => new Log()); Server::setResource('logger', function ($register) { return $register->get('logger'); }, ['register']); +Server::setResource('statsd', function ($register) { + return $register->get('statsd'); +}, ['register']); + Server::setResource('pools', function ($register) { return $register->get('pools'); }, ['register']); @@ -111,7 +108,7 @@ $connection = $pools->get('queue')->pop()->getResource(); $workerNumber = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)); if (empty(App::getEnv('QUEUE'))) { - throw new Exception('Please configure "QUEUE" environemnt variable.'); + throw new Exception('Please configure "QUEUE" environment variable.'); } $adapter = new Swoole($connection, $workerNumber, App::getEnv('QUEUE')); @@ -149,7 +146,7 @@ $server $log->addExtra('line', $error->getLine()); $log->addExtra('trace', $error->getTraceAsString()); $log->addExtra('detailedTrace', $error->getTrace()); - $log->addExtra('roles', \Utopia\Database\Validator\Authorization::$roles); + $log->addExtra('roles', Authorization::getRoles()); $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; $log->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING); diff --git a/app/workers/builds.php b/app/workers/builds.php index 972eb5dd18..41867a5dd3 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -1,11 +1,14 @@ args['project'] ?? []); $resource = new Document($this->args['resource'] ?? []); $deployment = new Document($this->args['deployment'] ?? []); + $template = new Document($this->args['template'] ?? []); switch ($type) { case BUILD_TYPE_DEPLOYMENT: case BUILD_TYPE_RETRY: Console::info('Creating build for deployment: ' . $deployment->getId()); - $this->buildDeployment($project, $resource, $deployment); + $github = new GitHub($this->getCache()); + $this->buildDeployment($github, $project, $resource, $deployment, $template); break; default: @@ -61,11 +69,12 @@ class BuildsV1 extends Worker * @throws \Utopia\Database\Exception\Structure * @throws Throwable */ - protected function buildDeployment(Document $project, Document $function, Document $deployment) + protected function buildDeployment(GitHub $github, Document $project, Document $function, Document $deployment, Document $template) { global $register; $dbForProject = $this->getProjectDB($project); + $dbForConsole = $this->getConsoleDB(); $function = $dbForProject->getDocument('functions', $function->getId()); if ($function->isEmpty()) { @@ -77,6 +86,10 @@ class BuildsV1 extends Worker throw new Exception('Deployment not found', 404); } + if (empty($deployment->getAttribute('entrypoint', ''))) { + throw new Exception('Entrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function\'s "Settings" > "Configuration" > "Entrypoint".', 500); + } + $runtimes = Config::getParam('runtimes', []); $key = $function->getAttribute('runtime'); $runtime = isset($runtimes[$key]) ? $runtimes[$key] : null; @@ -84,18 +97,20 @@ class BuildsV1 extends Worker throw new Exception('Runtime "' . $function->getAttribute('runtime', '') . '" is not supported'); } - $connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); /** @TODO : move this to the registry or someplace else */ - $device = Storage::DEVICE_LOCAL; - try { - $dsn = new DSN($connection); - $device = $dsn->getScheme(); - } catch (\Exception $e) { - Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.'); - } + // Realtime preparation + $allEvents = Event::generateEvents('functions.[functionId].deployments.[deploymentId].update', [ + 'functionId' => $function->getId(), + 'deploymentId' => $deployment->getId() + ]); + + $startTime = DateTime::now(); + $durationStart = \microtime(true); $buildId = $deployment->getAttribute('buildId', ''); - $startTime = DateTime::now(); - if (empty($buildId)) { + + $isNewBuild = empty($buildId); + + if ($isNewBuild) { $buildId = ID::unique(); $build = $dbForProject->createDocument('builds', new Document([ '$id' => $buildId, @@ -104,15 +119,16 @@ class BuildsV1 extends Worker 'deploymentInternalId' => $deployment->getInternalId(), 'deploymentId' => $deployment->getId(), 'status' => 'processing', - 'outputPath' => '', + 'path' => '', 'runtime' => $function->getAttribute('runtime'), - 'source' => $deployment->getAttribute('path'), - 'sourceType' => $device, - 'stdout' => '', - 'stderr' => '', + 'source' => $deployment->getAttribute('path', ''), + 'sourceType' => strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)), + 'logs' => '', 'endTime' => null, - 'duration' => 0 + 'duration' => 0, + 'size' => 0 ])); + $deployment->setAttribute('buildId', $build->getId()); $deployment->setAttribute('buildInternalId', $build->getInternalId()); $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); @@ -120,91 +136,307 @@ class BuildsV1 extends Worker $build = $dbForProject->getDocument('builds', $buildId); } - /** Request the executor to build the code... */ - $build->setAttribute('status', 'building'); - $build = $dbForProject->updateDocument('builds', $buildId, $build); + $source = $deployment->getAttribute('path', ''); + $installationId = $deployment->getAttribute('installationId', ''); + $providerRepositoryId = $deployment->getAttribute('providerRepositoryId', ''); + $providerCommitHash = $deployment->getAttribute('providerCommitHash', ''); + $isVcsEnabled = $providerRepositoryId ? true : false; + $owner = ''; + $repositoryName = ''; - /** Trigger Webhook */ - $deploymentModel = new Deployment(); + if ($isVcsEnabled) { + $installation = $dbForConsole->getDocument('installations', $installationId); + $providerInstallationId = $installation->getAttribute('providerInstallationId'); + $privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); + $githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID'); - $deploymentUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME); - $deploymentUpdate - ->setProject($project) - ->setEvent('functions.[functionId].deployments.[deploymentId].update') - ->setParam('functionId', $function->getId()) - ->setParam('deploymentId', $deployment->getId()) - ->setPayload($deployment->getArrayCopy(array_keys($deploymentModel->getRules()))) - ->trigger(); - - /** Trigger Functions */ - $pools = $register->get('pools'); - $connection = $pools->get('queue')->pop(); - - $functions = new Func($connection->getResource()); - $functions - ->from($deploymentUpdate) - ->trigger(); - - $connection->reclaim(); - - /** Trigger Realtime */ - $allEvents = Event::generateEvents('functions.[functionId].deployments.[deploymentId].update', [ - 'functionId' => $function->getId(), - 'deploymentId' => $deployment->getId() - ]); - $target = Realtime::fromPayload( - // Pass first, most verbose event pattern - event: $allEvents[0], - payload: $build, - project: $project - ); - - Realtime::send( - projectId: 'console', - payload: $build->getArrayCopy(), - events: $allEvents, - channels: $target['channels'], - roles: $target['roles'] - ); - - $source = $deployment->getAttribute('path'); - - $vars = array_reduce($function->getAttribute('vars', []), function (array $carry, Document $var) { - $carry[$var->getAttribute('key')] = $var->getAttribute('value'); - return $carry; - }, []); + $github->initializeVariables($providerInstallationId, $privateKey, $githubAppId); + } try { - $response = $this->executor->createRuntime( - deploymentId: $deployment->getId(), - projectId: $project->getId(), - source: $source, - image: $runtime['image'], - remove: true, - entrypoint: $deployment->getAttribute('entrypoint'), - workdir: '/usr/code', - destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}", - variables: $vars, - commands: [ - 'sh', '-c', - 'tar -zxf /tmp/code.tar.gz -C /usr/code && \ - cd /usr/local/src/ && ./build.sh' - ] + if ($isNewBuild && $isVcsEnabled) { + $tmpDirectory = '/tmp/builds/' . $buildId . '/code'; + $rootDirectory = $function->getAttribute('providerRootDirectory', ''); + $rootDirectory = \rtrim($rootDirectory, '/'); + $rootDirectory = \ltrim($rootDirectory, '.'); + $rootDirectory = \ltrim($rootDirectory, '/'); + + $owner = $github->getOwnerName($providerInstallationId); + $repositoryName = $github->getRepositoryName($providerRepositoryId); + + $cloneOwner = $deployment->getAttribute('providerRepositoryOwner', $owner); + $cloneRepository = $deployment->getAttribute('providerRepositoryName', $repositoryName); + + $branchName = $deployment->getAttribute('providerBranch'); + $commitHash = $deployment->getAttribute('providerCommitHash', ''); + $gitCloneCommand = $github->generateCloneCommand($cloneOwner, $cloneRepository, $branchName, $tmpDirectory, $rootDirectory, $commitHash); + $stdout = ''; + $stderr = ''; + Console::execute('mkdir -p /tmp/builds/' . \escapeshellcmd($buildId), '', $stdout, $stderr); + $exit = Console::execute($gitCloneCommand, '', $stdout, $stderr); + + if ($exit !== 0) { + throw new \Exception('Unable to clone code repository: ' . $stderr); + } + + // Build from template + $templateRepositoryName = $template->getAttribute('repositoryName', ''); + $templateOwnerName = $template->getAttribute('ownerName', ''); + $templateBranch = $template->getAttribute('branch', ''); + + $templateRootDirectory = $template->getAttribute('rootDirectory', ''); + $templateRootDirectory = \rtrim($templateRootDirectory, '/'); + $templateRootDirectory = \ltrim($templateRootDirectory, '.'); + $templateRootDirectory = \ltrim($templateRootDirectory, '/'); + + if (!empty($templateRepositoryName) && !empty($templateOwnerName) && !empty($templateBranch)) { + // Clone template repo + $tmpTemplateDirectory = '/tmp/builds/' . \escapeshellcmd($buildId) . '/template'; + $gitCloneCommandForTemplate = $github->generateCloneCommand($templateOwnerName, $templateRepositoryName, $templateBranch, $tmpTemplateDirectory, $templateRootDirectory); + $exit = Console::execute($gitCloneCommandForTemplate, '', $stdout, $stderr); + + if ($exit !== 0) { + throw new \Exception('Unable to clone code repository: ' . $stderr); + } + + // Ensure directories + Console::execute('mkdir -p ' . $tmpTemplateDirectory . '/' . $templateRootDirectory, '', $stdout, $stderr); + Console::execute('mkdir -p ' . $tmpDirectory . '/' . $rootDirectory, '', $stdout, $stderr); + + // Merge template into user repo + Console::execute('cp -rfn ' . $tmpTemplateDirectory . '/' . $templateRootDirectory . '/* ' . $tmpDirectory . '/' . $rootDirectory, '', $stdout, $stderr); + + // Commit and push + $exit = Console::execute('git config --global user.email "team@appwrite.io" && git config --global user.name "Appwrite" && cd ' . $tmpDirectory . ' && git add . && git commit -m "Create \'' . \escapeshellcmd($function->getAttribute('name', '')) . '\' function" && git push origin ' . \escapeshellcmd($branchName), '', $stdout, $stderr); + + if ($exit !== 0) { + throw new \Exception('Unable to push code repository: ' . $stderr); + } + + $exit = Console::execute('cd ' . $tmpDirectory . ' && git rev-parse HEAD', '', $stdout, $stderr); + + if ($exit !== 0) { + throw new \Exception('Unable to get vcs commit SHA: ' . $stderr); + } + + $providerCommitHash = \trim($stdout); + $authorUrl = "https://github.com/$cloneOwner"; + + $deployment->setAttribute('providerCommitHash', $providerCommitHash ?? ''); + $deployment->setAttribute('providerCommitAuthorUrl', $authorUrl); + $deployment->setAttribute('providerCommitAuthor', 'Appwrite'); + $deployment->setAttribute('providerCommitMessage', "Create '" . $function->getAttribute('name', '') . "' function"); + $deployment->setAttribute('providerCommitUrl', "https://github.com/$cloneOwner/$cloneRepository/commit/$providerCommitHash"); + $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); + + /** + * Send realtime Event + */ + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $build, + project: $project + ); + Realtime::send( + projectId: 'console', + payload: $build->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); + } + + Console::execute('tar --exclude code.tar.gz -czf /tmp/builds/' . \escapeshellcmd($buildId) . '/code.tar.gz -C /tmp/builds/' . \escapeshellcmd($buildId) . '/code' . (empty($rootDirectory) ? '' : '/' . $rootDirectory) . ' .', '', $stdout, $stderr); + + $deviceFunctions = $this->getFunctionsDevice($project->getId()); + + $fileName = 'code.tar.gz'; + $fileTmpName = '/tmp/builds/' . $buildId . '/code.tar.gz'; + + $path = $deviceFunctions->getPath($deployment->getId() . '.' . \pathinfo($fileName, PATHINFO_EXTENSION)); + + $result = $deviceFunctions->move($fileTmpName, $path); + + if (!$result) { + throw new \Exception("Unable to move file"); + } + + Console::execute('rm -rf /tmp/builds/' . \escapeshellcmd($buildId), '', $stdout, $stderr); + + $source = $path; + + $build = $dbForProject->updateDocument('builds', $build->getId(), $build->setAttribute('source', $source)); + + $this->runGitAction('processing', $github, $providerCommitHash, $owner, $repositoryName, $project, $function, $deployment->getId(), $dbForProject, $dbForConsole); + } + + /** Request the executor to build the code... */ + $build->setAttribute('status', 'building'); + $build = $dbForProject->updateDocument('builds', $buildId, $build); + + if ($isVcsEnabled) { + $this->runGitAction('building', $github, $providerCommitHash, $owner, $repositoryName, $project, $function, $deployment->getId(), $dbForProject, $dbForConsole); + } + + /** Trigger Webhook */ + $deploymentModel = new Deployment(); + + $deploymentUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME); + $deploymentUpdate + ->setProject($project) + ->setEvent('functions.[functionId].deployments.[deploymentId].update') + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()) + ->setPayload($deployment->getArrayCopy(array_keys($deploymentModel->getRules()))) + ->trigger(); + + /** Trigger Functions */ + $pools = $register->get('pools'); + $connection = $pools->get('queue')->pop(); + + $functions = new Func($connection->getResource()); + $functions + ->from($deploymentUpdate) + ->trigger(); + + $connection->reclaim(); + + /** Trigger Realtime */ + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $build, + project: $project ); - $endTime = new \DateTime(); - $endTime->setTimestamp($response['endTimeUnix']); + Realtime::send( + projectId: 'console', + payload: $build->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); + + $vars = []; + + // Global vars + $varsFromProject = $dbForProject->find('variables', [ + Query::equal('resourceType', ['project']), + Query::limit(APP_LIMIT_SUBQUERY) + ]); + + foreach ($varsFromProject as $var) { + $vars[$var->getAttribute('key')] = $var->getAttribute('value') ?? ''; + } + + // Function vars + $vars = \array_merge($vars, array_reduce($function->getAttribute('vars', []), function (array $carry, Document $var) { + $carry[$var->getAttribute('key')] = $var->getAttribute('value'); + return $carry; + }, [])); + + // Appwrite vars + $vars = \array_merge($vars, [ + 'APPWRITE_FUNCTION_ID' => $function->getId(), + 'APPWRITE_FUNCTION_NAME' => $function->getAttribute('name'), + 'APPWRITE_FUNCTION_DEPLOYMENT' => $deployment->getId(), + 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), + 'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '', + ]); + + $command = $deployment->getAttribute('commands', ''); + $command = \str_replace('"', '\\"', $command); + + $response = null; + + $err = null; + + // TODO: Remove run() wrapper when switching to new utopia queue. That should be done on Swoole adapter in the libary + Co\run(function () use ($project, $deployment, &$response, $source, $function, $runtime, $vars, $command, &$build, $dbForProject, $allEvents, &$err) { + Co::join([ + Co\go(function () use (&$response, $project, $deployment, $source, $function, $runtime, $vars, $command, &$err) { + try { + $response = $this->executor->createRuntime( + deploymentId: $deployment->getId(), + projectId: $project->getId(), + source: $source, + image: $runtime['image'], + version: $function->getAttribute('version'), + remove: true, + entrypoint: $deployment->getAttribute('entrypoint'), + destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}", + variables: $vars, + command: 'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"' + ); + } catch (Exception $error) { + $err = $error; + } + }), + Co\go(function () use ($project, $deployment, &$response, &$build, $dbForProject, $allEvents, &$err) { + try { + $this->executor->getLogs( + deploymentId: $deployment->getId(), + projectId: $project->getId(), + callback: function ($logs) use (&$response, &$build, $dbForProject, $allEvents, $project) { + if ($response === null) { + $build = $dbForProject->getDocument('builds', $build->getId()); + + if ($build->isEmpty()) { + throw new Exception('Build not found', 404); + } + + $build = $build->setAttribute('logs', $build->getAttribute('logs', '') . $logs); + $build = $dbForProject->updateDocument('builds', $build->getId(), $build); + + /** + * Send realtime Event + */ + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $build, + project: $project + ); + Realtime::send( + projectId: 'console', + payload: $build->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); + } + } + ); + } catch (Exception $error) { + if (empty($err)) { + $err = $error; + } + } + }), + ]); + }); + + if ($err) { + throw $err; + } + + $endTime = DateTime::now(); + $durationEnd = \microtime(true); /** Update the build document */ - $build->setAttribute('endTime', DateTime::format($endTime)); - $build->setAttribute('duration', \intval($response['duration'])); - $build->setAttribute('status', $response['status']); - $build->setAttribute('outputPath', $response['outputPath']); - $build->setAttribute('stderr', $response['stderr']); - $build->setAttribute('stdout', $response['stdout']); + $build->setAttribute('startTime', DateTime::format((new \DateTime())->setTimestamp($response['startTime']))); + $build->setAttribute('endTime', $endTime); + $build->setAttribute('duration', \intval(\ceil($durationEnd - $durationStart))); + $build->setAttribute('status', 'ready'); + $build->setAttribute('path', $response['path']); + $build->setAttribute('size', $response['size']); + $build->setAttribute('logs', $response['output']); - /* Also update the deployment buildTime */ - $deployment->setAttribute('buildTime', $response['duration']); + if ($isVcsEnabled) { + $this->runGitAction('ready', $github, $providerCommitHash, $owner, $repositoryName, $project, $function, $deployment->getId(), $dbForProject, $dbForConsole); + } Console::success("Build id: $buildId created"); @@ -212,28 +444,33 @@ class BuildsV1 extends Worker if ($deployment->getAttribute('activate') === true) { $function->setAttribute('deploymentInternalId', $deployment->getInternalId()); $function->setAttribute('deployment', $deployment->getId()); + $function->setAttribute('live', true); $function = $dbForProject->updateDocument('functions', $function->getId(), $function); } /** Update function schedule */ $dbForConsole = $this->getConsoleDB(); + // Inform scheduler if function is still active $schedule = $dbForConsole->getDocument('schedules', $function->getAttribute('scheduleId')); - $schedule->setAttribute('resourceUpdatedAt', DateTime::now()); - $schedule + ->setAttribute('resourceUpdatedAt', DateTime::now()) ->setAttribute('schedule', $function->getAttribute('schedule')) ->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment'))); - - Authorization::skip(fn () => $dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule)); } catch (\Throwable $th) { $endTime = DateTime::now(); - $interval = (new \DateTime($endTime))->diff(new \DateTime($startTime)); + $durationEnd = \microtime(true); $build->setAttribute('endTime', $endTime); - $build->setAttribute('duration', $interval->format('%s') + 0); + $build->setAttribute('duration', \intval(\ceil($durationEnd - $durationStart))); $build->setAttribute('status', 'failed'); - $build->setAttribute('stderr', $th->getMessage()); + $build->setAttribute('logs', $th->getMessage()); Console::error($th->getMessage()); + Console::error($th->getFile() . ':' . $th->getLine()); + Console::error($th->getTraceAsString()); + + if ($isVcsEnabled) { + $this->runGitAction('failed', $github, $providerCommitHash, $owner, $repositoryName, $project, $function, $deployment->getId(), $dbForProject, $dbForConsole); + } } finally { $build = $dbForProject->updateDocument('builds', $buildId, $build); @@ -241,7 +478,7 @@ class BuildsV1 extends Worker * Send realtime Event */ $target = Realtime::fromPayload( - // Pass first, most verbose event pattern + // Pass first, most verbose event pattern event: $allEvents[0], payload: $build, project: $project @@ -253,20 +490,93 @@ class BuildsV1 extends Worker channels: $target['channels'], roles: $target['roles'] ); + + /** Update usage stats */ + if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { + $statsd = $register->get('statsd'); + $usage = new Stats($statsd); + $usage + ->setParam('projectInternalId', $project->getInternalId()) + ->setParam('projectId', $project->getId()) + ->setParam('functionId', $function->getId()) + ->setParam('builds.{scope}.compute', 1) + ->setParam('buildStatus', $build->getAttribute('status', '')) + ->setParam('buildTime', $build->getAttribute('duration')) + ->setParam('networkRequestSize', 0) + ->setParam('networkResponseSize', 0) + ->submit(); + } + } + } + + protected function runGitAction(string $status, GitHub $github, string $providerCommitHash, string $owner, string $repositoryName, Document $project, Document $function, string $deploymentId, Database $dbForProject, Database $dbForConsole): void + { + if ($function->getAttribute('providerSilentMode', false) === true) { + return; } - /** Trigger usage queue */ - $this - ->getUsageQueue() - ->setProject($project) - ->addMetric(METRIC_BUILDS, 1) // per project - ->addMetric(METRIC_BUILDS_STORAGE, $build->getAttribute('size', 0)) - ->addMetric(METRIC_BUILDS_COMPUTE, (int)$build->getAttribute('duration', 0) * 1000) - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS), 1) // per function - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE), $build->getAttribute('size', 0)) - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), (int)$build->getAttribute('duration', 0) * 1000) - ->trigger() - ; + $deployment = $dbForProject->getDocument('deployments', $deploymentId); + $commentId = $deployment->getAttribute('providerCommentId', ''); + + if (!empty($providerCommitHash)) { + $message = match ($status) { + 'ready' => 'Build succeeded.', + 'failed' => 'Build failed.', + 'processing' => 'Building...', + default => $status + }; + + $state = match ($status) { + 'ready' => 'success', + 'failed' => 'failure', + 'processing' => 'pending', + default => $status + }; + + $functionName = $function->getAttribute('name'); + $projectName = $project->getAttribute('name'); + + $name = "{$functionName} ({$projectName})"; + + $protocol = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https'; + $hostname = App::getEnv('_APP_DOMAIN'); + $functionId = $function->getId(); + $projectId = $project->getId(); + $providerTargetUrl = $protocol . '://' . $hostname . "/console/project-$projectId/functions/function-$functionId"; + + $github->updateCommitStatus($repositoryName, $providerCommitHash, $owner, $state, $message, $providerTargetUrl, $name); + } + + if (!empty($commentId)) { + $retries = 0; + + while (true) { + $retries++; + + try { + $dbForConsole->createDocument('vcsCommentLocks', new Document([ + '$id' => $commentId + ])); + break; + } catch (Exception $err) { + if ($retries >= 9) { + throw $err; + } + + \sleep(1); + } + } + + // Wrap in try/finally to ensure lock file gets deleted + try { + $comment = new Comment(); + $comment->parseComment($github->getComment($owner, $repositoryName, $commentId)); + $comment->addBuild($project, $function, $status, $deployment->getId(), ['type' => 'logs']); + $github->updateComment($owner, $repositoryName, $commentId, $comment->generateComment()); + } finally { + $dbForConsole->deleteDocument('vcsCommentLocks', $commentId); + } + } } public function shutdown(): void diff --git a/app/workers/certificates.php b/app/workers/certificates.php index 824a296b75..5a1e173b3a 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -2,6 +2,9 @@ use Appwrite\Event\Mail; use Appwrite\Network\Validator\CNAME; +use Appwrite\Utopia\Response\Model\Rule; +use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Event\Event; use Appwrite\Resque\Worker; use Appwrite\Template\Template; use Utopia\App; @@ -46,7 +49,7 @@ class CertificatesV1 extends Worker * 4. Validate security email. Cannot be empty, required by LetsEncrypt * 5. Validate renew date with certificate file, unless requested to skip by parameter * 6. Issue a certificate using certbot CLI - * 7. Update 'log' attribute on certificate document with Certbot message + * 7. Update 'logs' attribute on certificate document with Certbot message * 8. Create storage folder for certificate, if not ready already * 9. Move certificates from Certbot location to our Storage * 10. Create/Update our Storage with new Traefik config with new certificate paths @@ -56,7 +59,7 @@ class CertificatesV1 extends Worker * If at any point unexpected error occurs, program stops without applying changes to document, and error is thrown into worker * * If code stops with expected error: - * 1. 'log' attribute on document is updated with error message + * 1. 'logs' attribute on document is updated with error message * 2. 'attempts' amount is increased * 3. Console log is shown * 4. Email is sent to security email @@ -84,6 +87,8 @@ class CertificatesV1 extends Worker $certificate->setAttribute('domain', $domain->get()); } + $success = false; + try { // Email for alerts is required by LetsEncrypt $email = App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'); @@ -110,11 +115,8 @@ class CertificatesV1 extends Worker $letsEncryptData = $this->issueCertificate($folder, $domain->get(), $email); // Command succeeded, store all data into document - // We store stderr too, because it may include warnings - $certificate->setAttribute('log', \json_encode([ - 'stdout' => $letsEncryptData['stdout'], - 'stderr' => $letsEncryptData['stderr'], - ])); + $logs = 'Certificate successfully generated.'; + $certificate->setAttribute('logs', \mb_strcut($logs, 0, 1000000));// Limit to 1MB // Give certificates to Traefik $this->applyCertificateFiles($folder, $domain->get(), $letsEncryptData); @@ -123,9 +125,13 @@ class CertificatesV1 extends Worker $certificate->setAttribute('renewDate', $this->getRenewDate($domain->get())); $certificate->setAttribute('attempts', 0); $certificate->setAttribute('issueDate', DateTime::now()); + + $success = true; } catch (Throwable $e) { + $logs = $e->getMessage(); + // Set exception as log in certificate document - $certificate->setAttribute('log', $e->getMessage()); + $certificate->setAttribute('logs', \mb_strcut($logs, 0, 1000000));// Limit to 1MB // Increase attempts count $attempts = $certificate->getAttribute('attempts', 0) + 1; @@ -141,7 +147,7 @@ class CertificatesV1 extends Worker $certificate->setAttribute('updated', DateTime::now()); // Save all changes we made to certificate document into database - $this->saveCertificateDocument($domain->get(), $certificate); + $this->saveCertificateDocument($domain->get(), $certificate, $success); } } @@ -154,10 +160,11 @@ class CertificatesV1 extends Worker * * @param string $domain Domain name that certificate is for * @param Document $certificate Certificate document that we need to save + * @param bool $success Was certificate generation successful? * * @return void */ - private function saveCertificateDocument(string $domain, Document $certificate): void + private function saveCertificateDocument(string $domain, Document $certificate, bool $success): void { // Check if update or insert required $certificateDocument = $this->dbForConsole->findOne('certificates', [Query::equal('domain', [$domain])]); @@ -171,7 +178,7 @@ class CertificatesV1 extends Worker } $certificateId = $certificate->getId(); - $this->updateDomainDocuments($certificateId, $domain); + $this->updateDomainDocuments($certificateId, $domain, $success); } /** @@ -184,11 +191,6 @@ class CertificatesV1 extends Worker $envDomain = App::getEnv('_APP_DOMAIN', ''); if (!empty($envDomain) && $envDomain !== 'localhost') { return $envDomain; - } else { - $domainDocument = $this->dbForConsole->findOne('domains', [Query::orderAsc('_id')]); - if ($domainDocument) { - return $domainDocument->getAttribute('domain'); - } } return null; @@ -279,7 +281,7 @@ class CertificatesV1 extends Worker $stderr = ''; $staging = (App::isProduction()) ? '' : ' --dry-run'; - $exit = Console::execute("certbot certonly --webroot --noninteractive --agree-tos{$staging}" + $exit = Console::execute("certbot certonly -v --webroot --noninteractive --agree-tos{$staging}" . " --email " . $email . " --cert-name " . $folder . " -w " . APP_STORAGE_CERTIFICATES @@ -420,25 +422,64 @@ class CertificatesV1 extends Worker * * @param string $certificateId ID of a new or updated certificate document * @param string $domain Domain that is affected by new certificate + * @param bool $success Was certificate generation successful? * * @return void */ - private function updateDomainDocuments(string $certificateId, string $domain): void + private function updateDomainDocuments(string $certificateId, string $domain, bool $success): void { - $domains = $this->dbForConsole->find('domains', [ + $rule = $this->dbForConsole->findOne('rules', [ Query::equal('domain', [$domain]), - Query::limit(1000), ]); - foreach ($domains as $domainDocument) { - $domainDocument->setAttribute('updated', DateTime::now()); - $domainDocument->setAttribute('certificateId', $certificateId); + if ($rule !== false && !$rule->isEmpty()) { + $rule->setAttribute('certificateId', $certificateId); + $rule->setAttribute('status', $success ? 'verified' : 'unverified'); + $this->dbForConsole->updateDocument('rules', $rule->getId(), $rule); - $this->dbForConsole->updateDocument('domains', $domainDocument->getId(), $domainDocument); + $projectId = $rule->getAttribute('projectId'); + $project = $this->dbForConsole->getDocument('projects', $projectId); - if ($domainDocument->getAttribute('projectId')) { - $this->dbForConsole->deleteCachedDocument('projects', $domainDocument->getAttribute('projectId')); - } + /** Trigger Webhook */ + $ruleModel = new Rule(); + $ruleUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME); + $ruleUpdate + ->setProject($project) + ->setEvent('rules.[ruleId].update') + ->setParam('ruleId', $rule->getId()) + ->setPayload($rule->getArrayCopy(array_keys($ruleModel->getRules()))) + ->trigger(); + + /** Trigger Functions */ + $ruleUpdate + ->setClass(Event::FUNCTIONS_CLASS_NAME) + ->setQueue(Event::FUNCTIONS_QUEUE_NAME) + ->trigger(); + + /** Trigger realtime event */ + $allEvents = Event::generateEvents('rules.[ruleId].update', [ + 'ruleId' => $rule->getId(), + ]); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $rule, + project: $project + ); + Realtime::send( + projectId: 'console', + payload: $rule->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); + Realtime::send( + projectId: $project->getId(), + payload: $rule->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'] + ); } } } diff --git a/app/workers/deletes.php b/app/workers/deletes.php index 6aa91cd590..f3968c07f2 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -1,6 +1,7 @@ deleteBucket($document, $project); break; + case DELETE_TYPE_INSTALLATIONS: + $this->deleteInstallation($document, $project); + break; + case DELETE_TYPE_RULES: + $this->deleteRule($document, $project); + break; default: if (\str_starts_with($document->getCollection(), 'database_')) { $this->deleteCollection($document, $project); @@ -106,11 +113,6 @@ class DeletesV1 extends Worker $this->deleteExpiredSessions(); break; - case DELETE_TYPE_CERTIFICATES: - $document = new Document($this->args['document']); - $this->deleteCertificates($document); - break; - case DELETE_TYPE_USAGE: $this->deleteUsageStats($this->args['hourlyUsageRetentionDatetime']); break; @@ -470,6 +472,11 @@ class DeletesV1 extends Worker $this->deleteByGroup('tokens', [ Query::equal('userInternalId', [$userInternalId]) ], $dbForProject); + + // Delete identities + $this->deleteByGroup('identities', [ + Query::equal('userInternalId', [$userInternalId]) + ], $dbForProject); } /** @@ -584,15 +591,29 @@ class DeletesV1 extends Worker { $projectId = $project->getId(); $dbForProject = $this->getProjectDB($project); + $dbForConsole = $this->getConsoleDB(); $functionId = $document->getId(); $functionInternalId = $document->getInternalId(); + /** + * Delete rules + */ + Console::info("Deleting rules for function " . $functionId); + $this->deleteByGroup('rules', [ + Query::equal('resourceType', ['function']), + Query::equal('resourceInternalId', [$functionInternalId]), + Query::equal('projectInternalId', [$project->getInternalId()]) + ], $dbForConsole, function (Document $document) use ($project) { + $this->deleteRule($document, $project); + }); + /** * Delete Variables */ Console::info("Deleting variables for function " . $functionId); $this->deleteByGroup('variables', [ - Query::equal('functionInternalId', [$functionInternalId]) + Query::equal('resourceType', ['function']), + Query::equal('resourceInternalId', [$functionInternalId]) ], $dbForProject); /** @@ -600,11 +621,11 @@ class DeletesV1 extends Worker */ Console::info("Deleting deployments for function " . $functionId); $storageFunctions = $this->getFunctionsDevice($projectId); - $deploymentIds = []; + $deploymentInternalIds = []; $this->deleteByGroup('deployments', [ - Query::equal('resourceId', [$functionId]) - ], $dbForProject, function (Document $document) use ($storageFunctions, &$deploymentIds) { - $deploymentIds[] = $document->getId(); + Query::equal('resourceInternalId', [$functionInternalId]) + ], $dbForProject, function (Document $document) use ($storageFunctions, &$deploymentInternalIds) { + $deploymentInternalIds[] = $document->getInternalId(); if ($storageFunctions->delete($document->getAttribute('path', ''), true)) { Console::success('Deleted deployment files: ' . $document->getAttribute('path', '')); } else { @@ -617,14 +638,14 @@ class DeletesV1 extends Worker */ Console::info("Deleting builds for function " . $functionId); $storageBuilds = $this->getBuildsDevice($projectId); - foreach ($deploymentIds as $deploymentId) { + foreach ($deploymentInternalIds as $deploymentInternalId) { $this->deleteByGroup('builds', [ - Query::equal('deploymentId', [$deploymentId]) - ], $dbForProject, function (Document $document) use ($storageBuilds, $deploymentId) { - if ($storageBuilds->delete($document->getAttribute('outputPath', ''), true)) { - Console::success('Deleted build files: ' . $document->getAttribute('outputPath', '')); + Query::equal('deploymentInternalId', [$deploymentInternalId]) + ], $dbForProject, function (Document $document) use ($storageBuilds) { + if ($storageBuilds->delete($document->getAttribute('path', ''), true)) { + Console::success('Deleted build files: ' . $document->getAttribute('path', '')); } else { - Console::error('Failed to delete build files: ' . $document->getAttribute('outputPath', '')); + Console::error('Failed to delete build files: ' . $document->getAttribute('path', '')); } }); } @@ -634,10 +655,14 @@ class DeletesV1 extends Worker */ Console::info("Deleting executions for function " . $functionId); $this->deleteByGroup('executions', [ - Query::equal('functionId', [$functionId]) + Query::equal('functionInternalId', [$functionInternalId]) ], $dbForProject); - // TODO: Request executor to delete runtime + /** + * Request executor to delete all deployment containers + */ + Console::info("Requesting executor to delete all deployment containers for function " . $functionId); + $this->deleteRuntimes($document, $project); } /** @@ -649,7 +674,7 @@ class DeletesV1 extends Worker $projectId = $project->getId(); $dbForProject = $this->getProjectDB($project); $deploymentId = $document->getId(); - $functionId = $document->getAttribute('resourceId'); + $deploymentInternalId = $document->getInternalId(); /** * Delete deployment files @@ -668,16 +693,21 @@ class DeletesV1 extends Worker Console::info("Deleting builds for deployment " . $deploymentId); $storageBuilds = $this->getBuildsDevice($projectId); $this->deleteByGroup('builds', [ - Query::equal('deploymentId', [$deploymentId]) + Query::equal('deploymentInternalId', [$deploymentInternalId]) ], $dbForProject, function (Document $document) use ($storageBuilds) { - if ($storageBuilds->delete($document->getAttribute('outputPath', ''), true)) { - Console::success('Deleted build files: ' . $document->getAttribute('outputPath', '')); + if ($storageBuilds->delete($document->getAttribute('path', ''), true)) { + Console::success('Deleted build files: ' . $document->getAttribute('path', '')); } else { - Console::error('Failed to delete build files: ' . $document->getAttribute('outputPath', '')); + Console::error('Failed to delete build files: ' . $document->getAttribute('path', '')); } }); - // TODO: Request executor to delete runtime + + /** + * Request executor to delete all deployment containers + */ + Console::info("Requesting executor to delete deployment container for deployment " . $deploymentId); + $this->deleteRuntimes($document, $project); } @@ -828,44 +858,18 @@ class DeletesV1 extends Worker } /** - * @param Document $document certificates document - * @throws \Utopia\Database\Exception\Authorization + * @param Document $document rule document + * @param Document $project project document */ - protected function deleteCertificates(Document $document): void + protected function deleteRule(Document $document, Document $project): void { $consoleDB = $this->getConsoleDB(); - // If domain has certificate generated - if (isset($document['certificateId'])) { - $domainUsingCertificate = $consoleDB->findOne('domains', [ - Query::equal('certificateId', [$document['certificateId']]) - ]); - - if (!$domainUsingCertificate) { - $mainDomain = App::getEnv('_APP_DOMAIN_TARGET', ''); - if ($mainDomain === $document->getAttribute('domain')) { - $domainUsingCertificate = $mainDomain; - } - } - - // If certificate is still used by some domain, mark we can't delete. - // Current domain should not be found, because we only have copy. Original domain is already deleted from database. - if ($domainUsingCertificate) { - Console::warning("Skipping certificate deletion, because a domain is still using it."); - return; - } - } - $domain = $document->getAttribute('domain'); $directory = APP_STORAGE_CERTIFICATES . '/' . $domain; $checkTraversal = realpath($directory) === $directory; - if ($domain && $checkTraversal && is_dir($directory)) { - // Delete certificate document, so Appwrite is aware of change - if (isset($document['certificateId'])) { - $consoleDB->deleteDocument('certificates', $document['certificateId']); - } - + if ($checkTraversal && is_dir($directory)) { // Delete files, so Traefik is aware of change array_map('unlink', glob($directory . '/*.*')); rmdir($directory); @@ -873,6 +877,11 @@ class DeletesV1 extends Worker } else { Console::info("No certificate files found for {$domain}"); } + + // Delete certificate document, so Appwrite is aware of change + if (isset($document['certificateId'])) { + $consoleDB->deleteDocument('certificates', $document['certificateId']); + } } protected function deleteBucket(Document $document, Document $project) @@ -885,4 +894,72 @@ class DeletesV1 extends Worker $device->deletePath($document->getId()); } + + protected function deleteInstallation(Document $document, Document $project) + { + $dbForProject = $this->getProjectDB($project); + $dbForConsole = $this->getConsoleDB(); + + $this->listByGroup('functions', [ + Query::equal('installationInternalId', [$document->getInternalId()]) + ], $dbForProject, function ($function) use ($dbForProject, $dbForConsole) { + $dbForConsole->deleteDocument('repositories', $function->getAttribute('repositoryId')); + + $function = $function + ->setAttribute('installationId', '') + ->setAttribute('installationInternalId', '') + ->setAttribute('providerRepositoryId', '') + ->setAttribute('providerBranch', '') + ->setAttribute('providerSilentMode', false) + ->setAttribute('providerRootDirectory', '') + ->setAttribute('repositoryId', '') + ->setAttribute('repositoryInternalId', ''); + $dbForProject->updateDocument('functions', $function->getId(), $function); + }); + } + + protected function deleteRuntimes(?Document $function, Document $project) + { + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); + + $deleteByFunction = function (Document $function) use ($project, $executor) { + $this->listByGroup( + 'deployments', + [ + Query::equal('resourceInternalId', [$function->getInternalId()]), + Query::equal('resourceType', ['functions']), + ], + $this->getProjectDB($project), + function (Document $deployment) use ($project, $executor) { + $deploymentId = $deployment->getId(); + + try { + $executor->deleteRuntime($project->getId(), $deploymentId); + Console::info("Runtime for deployment {$deploymentId} deleted."); + } catch (Throwable $th) { + Console::warning("Runtime for deployment {$deploymentId} skipped:"); + Console::error('[Error] Type: ' . get_class($th)); + Console::error('[Error] Message: ' . $th->getMessage()); + Console::error('[Error] File: ' . $th->getFile()); + Console::error('[Error] Line: ' . $th->getLine()); + } + } + ); + }; + + if ($function !== null) { + // Delete function runtimes + $deleteByFunction($function); + } else { + // Delete all project runtimes + $this->listByGroup( + 'functions', + [], + $this->getProjectDB($project), + function (Document $function) use ($deleteByFunction) { + $deleteByFunction($function); + } + ); + } + } } diff --git a/app/workers/functions.php b/app/workers/functions.php index 7dec0ce90c..cae3a73cc8 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -2,11 +2,12 @@ require_once __DIR__ . '/../worker.php'; -use Appwrite\Event\Usage; +use Domnikl\Statsd\Client; use Utopia\Queue\Message; use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Usage\Stats; use Appwrite\Utopia\Response\Model\Execution; use Executor\Executor; use Utopia\App; @@ -30,11 +31,14 @@ Server::setResource('execute', function () { Log $log, Func $queueForFunctions, Database $dbForProject, - Usage $queueForUsage, + Client $statsd, Document $project, Document $function, string $trigger, string $data = null, + string $path, + string $method, + array $headers, ?Document $user = null, string $jwt = null, string $event = null, @@ -43,7 +47,6 @@ Server::setResource('execute', function () { ) { $user ??= new Document(); $functionId = $function->getId(); - $functionInternalId = $function->getInternalId(); $deploymentId = $function->getAttribute('deployment', ''); $log->addTag('functionId', $functionId); @@ -51,7 +54,6 @@ Server::setResource('execute', function () { /** Check if deployment exists */ $deployment = $dbForProject->getDocument('deployments', $deploymentId); - $deploymentInternalId = $deployment->getInternalId(); if ($deployment->getAttribute('resourceId') !== $functionId) { throw new Exception('Deployment not found. Create deployment before trying to execute a function'); @@ -80,100 +82,146 @@ Server::setResource('execute', function () { $runtime = $runtimes[$function->getAttribute('runtime')]; + $headers['x-appwrite-trigger'] = $trigger; + $headers['x-appwrite-event'] = $event ?? ''; + $headers['x-appwrite-user-id'] = $user->getId() ?? ''; + $headers['x-appwrite-user-jwt'] = $jwt ?? ''; + /** Create execution or update execution status */ $execution = $dbForProject->getDocument('executions', $executionId ?? ''); if ($execution->isEmpty()) { + $headersFiltered = []; + foreach ($headers as $key => $value) { + if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_REQUEST)) { + $headersFiltered[] = [ 'name' => $key, 'value' => $value ]; + } + } + $executionId = ID::unique(); - $execution = $dbForProject->createDocument('executions', new Document([ + $execution = new Document([ '$id' => $executionId, '$permissions' => $user->isEmpty() ? [] : [Permission::read(Role::user($user->getId()))], - 'functionId' => $functionId, - 'functionInternalId' => $functionInternalId, - 'deploymentInternalId' => $deploymentInternalId, - 'deploymentId' => $deploymentId, - 'trigger' => $trigger, - 'status' => 'waiting', - 'statusCode' => 0, - 'response' => '', - 'stderr' => '', + 'functionInternalId' => $function->getInternalId(), + 'functionId' => $function->getId(), + 'deploymentInternalId' => $deployment->getInternalId(), + 'deploymentId' => $deployment->getId(), + 'trigger' => 'http', + 'status' => 'processing', + 'responseStatusCode' => 0, + 'responseHeaders' => [], + 'requestPath' => $path, + 'requestMethod' => $method, + 'requestHeaders' => $headersFiltered, + 'errors' => '', + 'logs' => '', 'duration' => 0.0, - 'search' => implode(' ', [$function->getId(), $executionId]), - ])); + 'search' => implode(' ', [$functionId, $executionId]), + ]); + + if ($function->getAttribute('logging')) { + $execution = $dbForProject->createDocument('executions', $execution); + } // TODO: @Meldiron Trigger executions.create event here if ($execution->isEmpty()) { throw new Exception('Failed to create or read execution'); } - - /** - * Usage - */ - - $queueForUsage - ->addMetric(METRIC_EXECUTIONS, 1) // per project - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS), 1); // per function } - $execution->setAttribute('status', 'processing'); - $execution = $dbForProject->updateDocument('executions', $executionId, $execution); + if ($execution->getAttribute('status') !== 'processing') { + $execution->setAttribute('status', 'processing'); - $vars = array_reduce($function->getAttribute('vars', []), function (array $carry, Document $var) { + if ($function->getAttribute('logging')) { + $execution = $dbForProject->updateDocument('executions', $executionId, $execution); + } + } + + $durationStart = \microtime(true); + + $vars = []; + + // Shared vars + $varsShared = $project->getAttribute('variables', []); + $vars = \array_merge($vars, \array_reduce($varsShared, function (array $carry, Document $var) { + $carry[$var->getAttribute('key')] = $var->getAttribute('value') ?? ''; + return $carry; + }, [])); + + // Function vars + $vars = \array_merge($vars, array_reduce($function->getAttribute('vars', []), function (array $carry, Document $var) { $carry[$var->getAttribute('key')] = $var->getAttribute('value'); return $carry; - }, []); + }, [])); - /** Collect environment variables */ + // Appwrite vars $vars = \array_merge($vars, [ 'APPWRITE_FUNCTION_ID' => $functionId, 'APPWRITE_FUNCTION_NAME' => $function->getAttribute('name'), 'APPWRITE_FUNCTION_DEPLOYMENT' => $deploymentId, - 'APPWRITE_FUNCTION_TRIGGER' => $trigger, 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), 'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '', 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '', - 'APPWRITE_FUNCTION_EVENT' => $event ?? '', - 'APPWRITE_FUNCTION_EVENT_DATA' => $eventData ?? '', - 'APPWRITE_FUNCTION_DATA' => $data ?? '', - 'APPWRITE_FUNCTION_USER_ID' => $user->getId() ?? '', - 'APPWRITE_FUNCTION_JWT' => $jwt ?? '', ]); + $body = $eventData ?? ''; + if (empty($body)) { + $body = $data ?? ''; + } + /** Execute function */ try { - $client = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); - $executionResponse = $client->createExecution( + $command = $runtime['startCommand']; + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); + $executionResponse = $executor->createExecution( projectId: $project->getId(), deploymentId: $deploymentId, - payload: $vars['APPWRITE_FUNCTION_DATA'] ?? '', + body: \strlen($body) > 0 ? $body : null, variables: $vars, timeout: $function->getAttribute('timeout', 0), image: $runtime['image'], - source: $build->getAttribute('outputPath', ''), + source: $build->getAttribute('path', ''), entrypoint: $deployment->getAttribute('entrypoint', ''), + version: $function->getAttribute('version'), + path: $path, + method: $method, + headers: $headers, + runtimeEntrypoint: 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '"' ); + $status = $executionResponse['statusCode'] >= 400 ? 'failed' : 'completed'; + + $headersFiltered = []; + foreach ($executionResponse['headers'] as $key => $value) { + if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_RESPONSE)) { + $headersFiltered[] = [ 'name' => $key, 'value' => $value ]; + } + } + /** Update execution status */ $execution - ->setAttribute('status', $executionResponse['status']) - ->setAttribute('statusCode', $executionResponse['statusCode']) - ->setAttribute('response', $executionResponse['response']) - ->setAttribute('stdout', $executionResponse['stdout']) - ->setAttribute('stderr', $executionResponse['stderr']) + ->setAttribute('status', $status) + ->setAttribute('responseStatusCode', $executionResponse['statusCode']) + ->setAttribute('responseHeaders', $headersFiltered) + ->setAttribute('logs', $executionResponse['logs']) + ->setAttribute('errors', $executionResponse['errors']) ->setAttribute('duration', $executionResponse['duration']); } catch (\Throwable $th) { - $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); + $durationEnd = \microtime(true); + $execution - ->setAttribute('duration', (float)$interval->format('%s.%f')) + ->setAttribute('duration', $durationEnd - $durationStart) ->setAttribute('status', 'failed') - ->setAttribute('statusCode', $th->getCode()) - ->setAttribute('stderr', $th->getMessage()); + ->setAttribute('responseStatusCode', 500) + ->setAttribute('errors', $th->getMessage() . '\nError Code: ' . $th->getCode()); $error = $th->getMessage(); $errorCode = $th->getCode(); } - $execution = $dbForProject->updateDocument('executions', $executionId, $execution); + if ($function->getAttribute('logging')) { + $execution = $dbForProject->updateDocument('executions', $executionId, $execution); + } /** Trigger Webhook */ $executionModel = new Execution(); @@ -217,13 +265,24 @@ Server::setResource('execute', function () { roles: $target['roles'] ); - /** Trigger usage queue */ - $queueForUsage - ->setProject($project) - ->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000))// per project - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) - ->trigger() - ; + /** Update usage stats */ + if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { + $usage = new Stats($statsd); + $usage + ->setParam('projectId', $project->getId()) + ->setParam('projectInternalId', $project->getInternalId()) + ->setParam('functionId', $function->getId()) // TODO: We should use functionInternalId in usage stats + ->setParam('executions.{scope}.compute', 1) + ->setParam('executionStatus', $execution->getAttribute('status', '')) + ->setParam('executionTime', $execution->getAttribute('duration')) + ->setParam('networkRequestSize', 0) + ->setParam('networkResponseSize', 0) + ->submit(); + } + + if (!empty($error)) { + throw new Exception($error, $errorCode); + } }; }); @@ -231,10 +290,10 @@ $server->job() ->inject('message') ->inject('dbForProject') ->inject('queueForFunctions') - ->inject('queueForUsage') + ->inject('statsd') ->inject('execute') ->inject('log') - ->action(function (Message $message, Database $dbForProject, Func $queueForFunctions, Usage $queueForUsage, callable $execute, Log $log) { + ->action(function (Message $message, Database $dbForProject, Func $queueForFunctions, Client $statsd, callable $execute, Log $log) { $payload = $message->getPayload() ?? []; if (empty($payload)) { @@ -243,7 +302,7 @@ $server->job() $type = $payload['type'] ?? ''; $events = $payload['events'] ?? []; - $data = $payload['data'] ?? ''; + $data = $payload['body'] ?? ''; $eventData = $payload['payload'] ?? ''; $project = new Document($payload['project'] ?? []); $function = new Document($payload['function'] ?? []); @@ -275,26 +334,26 @@ $server->job() continue; } Console::success('Iterating function: ' . $function->getAttribute('name')); - try { - $execute( - log: $log, - queueForUsage: $queueForUsage, - dbForProject: $dbForProject, - project: $project, - function: $function, - queueForFunctions: $queueForFunctions, - trigger: 'event', - event: $events[0], - eventData: \is_string($eventData) ? $eventData : \json_encode($eventData), - user: $user, - data: null, - executionId: null, - jwt: null - ); - Console::success('Triggered function: ' . $events[0]); - } catch (\Throwable $th) { - Console::error("Failed to execute " . $function->getId() . " with error: " . $th->getMessage()); - } + $execute( + statsd: $statsd, + dbForProject: $dbForProject, + project: $project, + function: $function, + queueForFunctions: $queueForFunctions, + trigger: 'event', + event: $events[0], + eventData: \is_string($eventData) ? $eventData : \json_encode($eventData), + user: $user, + data: null, + executionId: null, + jwt: null, + path: '/', + method: 'POST', + headers: [ + 'user-agent' => 'Appwrite/' . APP_VERSION_STABLE + ], + ); + Console::success('Triggered function: ' . $events[0]); } } return; @@ -321,7 +380,10 @@ $server->job() data: $data, user: $user, jwt: $jwt, - queueForUsage: $queueForUsage, + path: $payload['path'], + method: $payload['method'], + headers: $payload['headers'], + statsd: $statsd, ); break; case 'schedule': @@ -338,7 +400,10 @@ $server->job() data: null, user: null, jwt: null, - queueForUsage: $queueForUsage, + path: $payload['path'], + method: $payload['method'], + headers: $payload['headers'], + statsd: $statsd, ); break; } diff --git a/app/workers/mails.php b/app/workers/mails.php index e1ce8307ac..56676b4aed 100644 --- a/app/workers/mails.php +++ b/app/workers/mails.php @@ -1,6 +1,7 @@ args['recipient']; $subject = $this->args['subject']; - $name = $this->args['name']; $body = $this->args['body']; - $from = $this->args['from']; + $variables = $this->args['variables']; + $name = $this->args['name']; - /** @var \PHPMailer\PHPMailer\PHPMailer $mail */ - $mail = empty($smtp) ? $register->get('smtp') : $this->getMailer($smtp); + $body = Template::fromFile(__DIR__ . '/../config/locale/templates/email-base.tpl'); + + foreach ($variables as $key => $value) { + $body->setParam('{{' . $key . '}}', $value); + } + + $body = $body->render(); + + /** @var PHPMailer $mail */ + $mail = empty($smtp) + ? $register->get('smtp') + : $this->getMailer($smtp); $mail->clearAddresses(); $mail->clearAllRecipients(); @@ -48,12 +58,7 @@ class MailsV1 extends Worker $mail->clearAttachments(); $mail->clearBCCs(); $mail->clearCCs(); - - $mail->setFrom(App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM), (empty($from) ? \urldecode(App::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server')) : $from)); $mail->addAddress($recipient, $name); - if (isset($smtp['replyTo'])) { - $mail->addReplyTo($smtp['replyTo']); - } $mail->Subject = $subject; $mail->Body = $body; $mail->AltBody = \strip_tags($body); @@ -80,17 +85,17 @@ class MailsV1 extends Worker $mail->SMTPAuth = (!empty($username) && !empty($password)); $mail->Username = $username; $mail->Password = $password; - $mail->SMTPSecure = $smtp['secure'] === 'tls'; + $mail->SMTPSecure = $smtp['secure']; $mail->SMTPAutoTLS = false; $mail->CharSet = 'UTF-8'; - $from = \urldecode($smtp['senderName'] ?? App::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server')); - $email = $smtp['senderEmail'] ?? App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $mail->setFrom($smtp['senderEmail'], $smtp['senderName']); - $mail->setFrom($email, $from); - $mail->addReplyTo($email, $from); + if (!empty($smtp['replyTo'])) { + $mail->addReplyTo($smtp['replyTo'], $smtp['senderName']); + } - $mail->isHTML(true); + $mail->isHTML(); return $mail; } diff --git a/app/workers/migrations.php b/app/workers/migrations.php new file mode 100644 index 0000000000..0f8194acf8 --- /dev/null +++ b/app/workers/migrations.php @@ -0,0 +1,308 @@ +args['type'] ?? ''; + $events = $this->args['events'] ?? []; + $project = new Document($this->args['project'] ?? []); + $user = new Document($this->args['user'] ?? []); + $payload = json_encode($this->args['payload'] ?? []); + + if ($project->getId() === 'console') { + return; + } + + /** + * Handle Event execution. + */ + if (! empty($events)) { + return; + } + + $this->dbForProject = $this->getProjectDB($project); + + $this->processMigration(); + } + + /** + * Process Source + * + * @return Source + * + * @throws \Exception + */ + protected function processSource(string $source, array $credentials): Source + { + switch ($source) { + case Firebase::getName(): + return new Firebase( + json_decode($credentials['serviceAccount'], true), + ); + break; + case Supabase::getName(): + return new Supabase( + $credentials['endpoint'], + $credentials['apiKey'], + $credentials['databaseHost'], + 'postgres', + $credentials['username'], + $credentials['password'], + $credentials['port'], + ); + break; + case NHost::getName(): + return new NHost( + $credentials['subdomain'], + $credentials['region'], + $credentials['adminSecret'], + $credentials['database'], + $credentials['username'], + $credentials['password'], + $credentials['port'], + ); + break; + case Appwrite::getName(): + return new Appwrite($credentials['projectId'], str_starts_with($credentials['endpoint'], 'http://localhost/v1') ? 'http://appwrite/v1' : $credentials['endpoint'], $credentials['apiKey']); + break; + default: + throw new \Exception('Invalid source type'); + break; + } + } + + protected function updateMigrationDocument(Document $migration, Document $project): Document + { + /** Trigger Realtime */ + $allEvents = Event::generateEvents('migrations.[migrationId].update', [ + 'migrationId' => $migration->getId(), + ]); + + $target = Realtime::fromPayload( + event: $allEvents[0], + payload: $migration, + project: $project + ); + + Realtime::send( + projectId: 'console', + payload: $migration->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'], + ); + + Realtime::send( + projectId: $project->getId(), + payload: $migration->getArrayCopy(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'], + ); + + return $this->dbForProject->updateDocument('migrations', $migration->getId(), $migration); + } + + protected function removeAPIKey(Document $apiKey) + { + $consoleDB = $this->getConsoleDB(); + + $consoleDB->deleteDocument('keys', $apiKey->getId()); + } + + protected function generateAPIKey(Document $project): Document + { + $consoleDB = $this->getConsoleDB(); + $generatedSecret = bin2hex(\random_bytes(128)); + + $key = new Document([ + '$id' => ID::unique(), + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'projectInternalId' => $project->getInternalId(), + 'projectId' => $project->getId(), + 'name' => 'Transfer API Key', + 'scopes' => [ + 'users.read', + 'users.write', + 'teams.read', + 'teams.write', + 'databases.read', + 'databases.write', + 'collections.read', + 'collections.write', + 'documents.read', + 'documents.write', + 'buckets.read', + 'buckets.write', + 'files.read', + 'files.write', + 'functions.read', + 'functions.write', + ], + 'expire' => null, + 'sdks' => [], + 'accessedAt' => null, + 'secret' => $generatedSecret, + ]); + + $consoleDB->createDocument('keys', $key); + $consoleDB->deleteCachedDocument('projects', $project->getId()); + + return $key; + } + + /** + * Process Migration + * + * @return void + */ + protected function processMigration(): void + { + /** + * @var Document $migrationDocument + * @var Transfer $transfer + */ + $migrationDocument = null; + $transfer = null; + $projectDocument = $this->getConsoleDB()->getDocument('projects', $this->args['project']['$id']); + $tempAPIKey = $this->generateAPIKey($projectDocument); + + try { + $migrationDocument = $this->dbForProject->getDocument('migrations', $this->args['migration']['$id']); + $migrationDocument->setAttribute('stage', 'processing'); + $migrationDocument->setAttribute('status', 'processing'); + $this->updateMigrationDocument($migrationDocument, $projectDocument); + + $source = $this->processSource($migrationDocument->getAttribute('source'), $migrationDocument->getAttribute('credentials')); + + $source->report(); + + $destination = new DestinationsAppwrite( + $projectDocument->getId(), + 'http://appwrite/v1', + $tempAPIKey['secret'], + ); + + $transfer = new Transfer( + $source, + $destination + ); + + /** Start Transfer */ + $migrationDocument->setAttribute('stage', 'migrating'); + $this->updateMigrationDocument($migrationDocument, $projectDocument); + $transfer->run($migrationDocument->getAttribute('resources'), function () use ($migrationDocument, $transfer, $projectDocument) { + $migrationDocument->setAttribute('resourceData', json_encode($transfer->getCache())); + $migrationDocument->setAttribute('statusCounters', json_encode($transfer->getStatusCounters())); + + $this->updateMigrationDocument($migrationDocument, $projectDocument); + }); + + $errors = $transfer->getReport(Resource::STATUS_ERROR); + + if (count($errors) > 0) { + $migrationDocument->setAttribute('status', 'failed'); + $migrationDocument->setAttribute('stage', 'finished'); + + $errorMessages = []; + foreach ($errors as $error) { + $errorMessages[] = "Failed to transfer resource '{$error['id']}:{$error['resource']}' with message '{$error['message']}'"; + } + + $migrationDocument->setAttribute('errors', $errorMessages); + $this->updateMigrationDocument($migrationDocument, $projectDocument); + + return; + } + + $migrationDocument->setAttribute('status', 'completed'); + $migrationDocument->setAttribute('stage', 'finished'); + } catch (\Throwable $th) { + Console::error($th->getMessage()); + + if ($migrationDocument) { + Console::error($th->getMessage()); + Console::error($th->getTraceAsString()); + $migrationDocument->setAttribute('status', 'failed'); + $migrationDocument->setAttribute('stage', 'finished'); + $migrationDocument->setAttribute('errors', [$th->getMessage()]); + + return; + } + + if ($transfer) { + $errors = $transfer->getReport(Resource::STATUS_ERROR); + + if (count($errors) > 0) { + $migrationDocument->setAttribute('status', 'failed'); + $migrationDocument->setAttribute('stage', 'finished'); + $migrationDocument->setAttribute('errors', $errors); + } + } + } finally { + if ($migrationDocument) { + $this->updateMigrationDocument($migrationDocument, $projectDocument); + } + if ($tempAPIKey) { + $this->removeAPIKey($tempAPIKey); + } + } + } + + /** + * Process Verification + * + * @return void + */ + protected function processVerification(): void + { + } + + public function shutdown(): void + { + } +} diff --git a/app/workers/usage.php b/app/workers/usage.php deleted file mode 100644 index 0c9dcbc5aa..0000000000 --- a/app/workers/usage.php +++ /dev/null @@ -1,288 +0,0 @@ -deployments>build || documents>collection>database || buckets>files. - * When we remove a parent document we need to deduct his children aggregation from the project scope. - */ -Server::setResource('reduce', function (Cache $cache, Registry $register, $pools) { - return function ($database, $projectInternalId, Document $document, array &$metrics) use ($pools, $cache, $register): void { - try { - $dbForProject = new Database( - $pools - ->get($database) - ->pop() - ->getResource(), - $cache - ); - - $dbForProject->setNamespace('_' . $projectInternalId); - - switch (true) { - case $document->getCollection() === 'users': // users - $sessions = count($document->getAttribute(METRIC_SESSIONS, 0)); - if (!empty($sessions)) { - $metrics[] = [ - 'key' => METRIC_SESSIONS, - 'value' => ($sessions * -1), - ]; - } - break; - case $document->getCollection() === 'databases': // databases - $collections = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{databaseInternalId}', $document->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS))); - $documents = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{databaseInternalId}', $document->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS))); - if (!empty($collections['value'])) { - $metrics[] = [ - 'key' => METRIC_COLLECTIONS, - 'value' => ($collections['value'] * -1), - ]; - } - - if (!empty($documents['value'])) { - $metrics[] = [ - 'key' => METRIC_DOCUMENTS, - 'value' => ($documents['value'] * -1), - ]; - } - break; - case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections - $parts = explode('_', $document->getCollection()); - $databaseInternalId = $parts[1] ?? 0; - $documents = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $document->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS))); - - if (!empty($documents['value'])) { - $metrics[] = [ - 'key' => METRIC_DOCUMENTS, - 'value' => ($documents['value'] * -1), - ]; - $metrics[] = [ - 'key' => str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), - 'value' => ($documents['value'] * -1), - ]; - } - break; - - case $document->getCollection() === 'buckets': - $files = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{bucketInternalId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES))); - $storage = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{bucketInternalId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE))); - - if (!empty($files['value'])) { - $metrics[] = [ - 'key' => METRIC_FILES, - 'value' => ($files['value'] * -1), - ]; - } - - if (!empty($storage['value'])) { - $metrics[] = [ - 'key' => METRIC_FILES_STORAGE, - 'value' => ($storage['value'] * -1), - ]; - } - break; - - case $document->getCollection() === 'functions': - $deployments = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS))); - $deploymentsStorage = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE))); - $builds = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS))); - $buildsStorage = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE))); - $buildsCompute = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE))); - $executions = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS))); - $executionsCompute = $dbForProject->getDocument('stats', md5(INFINITY_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE))); - - if (!empty($deployments['value'])) { - $metrics[] = [ - 'key' => METRIC_DEPLOYMENTS, - 'value' => ($deployments['value'] * -1), - ]; - } - - if (!empty($deploymentsStorage['value'])) { - $metrics[] = [ - 'key' => METRIC_DEPLOYMENTS_STORAGE, - 'value' => ($deploymentsStorage['value'] * -1), - ]; - } - - if (!empty($builds['value'])) { - $metrics[] = [ - 'key' => METRIC_BUILDS, - 'value' => ($builds['value'] * -1), - ]; - } - - if (!empty($buildsStorage['value'])) { - $metrics[] = [ - 'key' => METRIC_BUILDS_STORAGE, - 'value' => ($buildsStorage['value'] * -1), - ]; - } - - if (!empty($buildsCompute['value'])) { - $metrics[] = [ - 'key' => METRIC_BUILDS_COMPUTE, - 'value' => ($buildsCompute['value'] * -1), - ]; - } - - if (!empty($executions['value'])) { - $metrics[] = [ - 'key' => METRIC_EXECUTIONS, - 'value' => ($executions['value'] * -1), - ]; - } - - if (!empty($executionsCompute['value'])) { - $metrics[] = [ - 'key' => METRIC_EXECUTIONS_COMPUTE, - 'value' => ($executionsCompute['value'] * -1), - ]; - } - break; - default: - break; - } - } catch (\Exception $e) { - console::error("[reducer] " . " {DateTime::now()} " . " {$projectInternalId} " . " {$e->getMessage()}"); - } finally { - $pools->reclaim(); - } - }; -}, ['cache', 'register', 'pools']); - - -$server->job() - ->inject('message') - ->inject('reduce') - - ->action(function (Message $message, callable $reduce) use (&$stats) { - - $payload = $message->getPayload() ?? []; - $project = new Document($payload['project'] ?? []); - $projectId = $project->getInternalId(); - foreach ($payload['reduce'] ?? [] as $document) { - if (empty($document)) { - continue; - } - - $reduce( - database: $project->getAttribute('database'), - projectInternalId: $project->getInternalId(), - document: new Document($document), - metrics: $payload['metrics'], - ); - } - - $stats[$projectId]['database'] = $project->getAttribute('database'); - foreach ($payload['metrics'] ?? [] as $metric) { - if (!isset($stats[$projectId]['keys'][$metric['key']])) { - $stats[$projectId]['keys'][$metric['key']] = $metric['value']; - continue; - } - $stats[$projectId]['keys'][$metric['key']] += $metric['value']; - } - }); - -$server - ->workerStart() - ->inject('register') - ->inject('cache') - ->inject('pools') - ->action(function ($register, $cache, $pools) use ($periods, &$stats) { - Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { - - $offset = count($stats); - $projects = array_slice($stats, 0, $offset, true); - array_splice($stats, 0, $offset); - - foreach ($projects as $projectInternalId => $project) { - try { - $dbForProject = new Database( - $pools - ->get($project['database']) - ->pop() - ->getResource(), - $cache - ); - - $dbForProject->setNamespace('_' . $projectInternalId); - - foreach ($project['keys'] ?? [] as $key => $value) { - if ($value == 0) { - continue; - } - - foreach ($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' => App::getEnv('_APP_REGION', 'default'), - ])); - } catch (Duplicate $th) { - if ($value < 0) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $id, - 'value', - abs($value) - ); - } else { - $dbForProject->increaseDocumentAttribute( - 'stats', - $id, - 'value', - $value - ); - } - } - } - } - if (!empty($project['keys'])) { - $dbForProject->createDocument('statsLogger', new Document([ - 'time' => DateTime::now(), - 'metrics' => $project['keys'], - ])); - } - } catch (\Exception $e) { - $now = DateTime::now(); - console::error("[Error] " . " Time: {$now} " . " projectInternalId: {$projectInternalId}" . " File: {$e->getFile()}" . " Line: {$e->getLine()} " . " message: {$e->getMessage()}"); - } finally { - $pools->reclaim(); - } - } - }); - }); -$server->start(); diff --git a/bin/upgrade b/bin/upgrade new file mode 100755 index 0000000000..ce32b9ca30 --- /dev/null +++ b/bin/upgrade @@ -0,0 +1,3 @@ +#!/bin/sh + +php /usr/src/code/app/cli.php upgrade $@ \ No newline at end of file diff --git a/bin/usage b/bin/usage new file mode 100644 index 0000000000..2709200ae4 --- /dev/null +++ b/bin/usage @@ -0,0 +1,3 @@ +#!/bin/sh + +php /usr/src/code/app/cli.php usage $@ \ No newline at end of file diff --git a/bin/worker-migrations b/bin/worker-migrations new file mode 100644 index 0000000000..54e57001b0 --- /dev/null +++ b/bin/worker-migrations @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ] +then + REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" +else + REDIS_BACKEND="redis://${_APP_REDIS_USER}:${_APP_REDIS_PASS}@${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" +fi + +INTERVAL=0.1 QUEUE='v1-migrations' APP_INCLUDE='/usr/src/code/app/workers/migrations.php' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-usage b/bin/worker-usage deleted file mode 100644 index 9d325ac46e..0000000000 --- a/bin/worker-usage +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -QUEUE=v1-usage php /usr/src/code/app/workers/usage.php $@ \ No newline at end of file diff --git a/composer.json b/composer.json index 1edb6d0e1c..fba885f951 100644 --- a/composer.json +++ b/composer.json @@ -41,22 +41,23 @@ "ext-openssl": "*", "ext-zlib": "*", "ext-sockets": "*", + "appwrite/php-runtimes": "0.12.0", "appwrite/php-clamav": "2.0.*", - "appwrite/php-runtimes": "0.11.*", "utopia-php/abuse": "0.31.*", "utopia-php/analytics": "0.10.*", "utopia-php/audit": "0.33.*", "utopia-php/cache": "0.8.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.42.*", - "utopia-php/domains": "1.1.*", + "utopia-php/database": "0.43.*", + "utopia-php/domains": "0.3.*", "utopia-php/dsn": "0.1.*", - "utopia-php/framework": "0.28.*", + "utopia-php/framework": "0.31.0", "utopia-php/image": "0.5.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.3.*", "utopia-php/messaging": "0.1.*", + "utopia-php/migration": "0.3.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.4.*", "utopia-php/pools": "0.4.*", @@ -64,11 +65,13 @@ "utopia-php/queue": "0.5.*", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.14.*", - "utopia-php/swoole": "0.8.*", + "utopia-php/swoole": "0.5.*", + "utopia-php/vcs": "0.4.*", "utopia-php/websocket": "0.1.*", "resque/php-resque": "1.3.6", "matomo/device-detector": "6.1.*", "dragonmantank/cron-expression": "3.3.2", + "influxdb/influxdb-php": "1.15.2", "phpmailer/phpmailer": "6.8.0", "chillerlan/php-qrcode": "4.3.4", "adhocore/jwt": "1.1.2", @@ -83,7 +86,7 @@ } ], "require-dev": { - "appwrite/sdk-generator": "0.33.*", + "appwrite/sdk-generator": "0.34.*", "ext-fileinfo": "*", "phpunit/phpunit": "9.5.20", "squizlabs/php_codesniffer": "^3.7", @@ -98,4 +101,4 @@ "php": "8.0" } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 0e72c867d2..8a3bf6d014 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": "2098172fc4b71eb0d41dcdbfea2f5061", + "content-hash": "bc47430e5cb3430f354b4eee6fd8c9c7", "packages": [ { "name": "adhocore/jwt", @@ -63,6 +63,47 @@ ], "time": "2021-02-20T09:56:44+00:00" }, + { + "name": "appwrite/appwrite", + "version": "8.0.0", + "source": { + "type": "git", + "url": "https://github.com/appwrite/sdk-for-php.git", + "reference": "2b9e966edf35c4061179ed98ea364698ab30de8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/2b9e966edf35c4061179ed98ea364698ab30de8b", + "reference": "2b9e966edf35c4061179ed98ea364698ab30de8b", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\": "src/Appwrite" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", + "support": { + "email": "team@appwrite.io", + "issues": "https://github.com/appwrite/sdk-for-php/issues", + "source": "https://github.com/appwrite/sdk-for-php/tree/8.0.0", + "url": "https://appwrite.io/support" + }, + "time": "2023-04-12T10:16:28+00:00" + }, { "name": "appwrite/php-clamav", "version": "2.0.0", @@ -115,15 +156,15 @@ }, { "name": "appwrite/php-runtimes", - "version": "0.11.1", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/appwrite/runtimes.git", - "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" + "reference": "5aa672ae744be0d7a3d4bf4c93455c65e9a23b4f" }, "require": { "php": ">=8.0", - "utopia-php/system": "0.6.*" + "utopia-php/system": "0.7.*" }, "require-dev": { "phpunit/phpunit": "^9.3", @@ -154,7 +195,7 @@ "php", "runtimes" ], - "time": "2022-11-07T16:45:52+00:00" + "time": "2023-08-07T09:56:11+00:00" }, { "name": "chillerlan/php-qrcode", @@ -479,6 +520,398 @@ ], "time": "2022-09-10T18:51:20+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "7.8.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "ext-curl": "*", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.8.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2023-08-27T10:20:53+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2023-08-03T15:11:55+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.6.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-08-27T10:13:57+00:00" + }, + { + "name": "influxdb/influxdb-php", + "version": "1.15.2", + "source": { + "type": "git", + "url": "https://github.com/influxdata/influxdb-php.git", + "reference": "d6e59f4f04ab9107574fda69c2cbe36671253d03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/influxdata/influxdb-php/zipball/d6e59f4f04ab9107574fda69c2cbe36671253d03", + "reference": "d6e59f4f04ab9107574fda69c2cbe36671253d03", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0|^7.0", + "php": "^5.5 || ^7.0 || ^8.0" + }, + "require-dev": { + "dms/phpunit-arraysubset-asserts": "^0.2.1", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "ext-curl": "Curl extension, needed for Curl driver", + "stefanotorresi/influxdb-php-async": "An asyncronous client for InfluxDB, implemented via ReactPHP." + }, + "type": "library", + "autoload": { + "psr-4": { + "InfluxDB\\": "src/InfluxDB" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Hoogendijk", + "email": "stephen@tca0.nl" + }, + { + "name": "Daniel Martinez", + "email": "danimartcas@hotmail.com" + }, + { + "name": "Gianluca Arbezzano", + "email": "gianarb92@gmail.com" + } + ], + "description": "InfluxDB client library for PHP", + "keywords": [ + "client", + "influxdata", + "influxdb", + "influxdb class", + "influxdb client", + "influxdb library", + "time series" + ], + "support": { + "issues": "https://github.com/influxdata/influxdb-php/issues", + "source": "https://github.com/influxdata/influxdb-php/tree/1.15.2" + }, + "abandoned": true, + "time": "2020-12-26T17:45:17+00:00" + }, { "name": "jean85/pretty-package-versions", "version": "1.6.0", @@ -686,16 +1119,16 @@ }, { "name": "matomo/device-detector", - "version": "6.1.4", + "version": "6.1.5", "source": { "type": "git", "url": "https://github.com/matomo-org/device-detector.git", - "reference": "74f6c4f6732b3ad6cdf25560746841d522969112" + "reference": "40ca2990dba2c1719e5c62168e822e0b86c167d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/74f6c4f6732b3ad6cdf25560746841d522969112", - "reference": "74f6c4f6732b3ad6cdf25560746841d522969112", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/40ca2990dba2c1719e5c62168e822e0b86c167d4", + "reference": "40ca2990dba2c1719e5c62168e822e0b86c167d4", "shasum": "" }, "require": { @@ -751,7 +1184,7 @@ "source": "https://github.com/matomo-org/matomo", "wiki": "https://dev.matomo.org/" }, - "time": "2023-08-02T08:48:53+00:00" + "time": "2023-08-17T16:17:41+00:00" }, { "name": "mongodb/mongodb", @@ -951,6 +1384,166 @@ ], "time": "2023-03-06T14:43:22+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/1.0.2" + }, + "time": "2023-04-10T20:12:12+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, { "name": "psr/log", "version": "1.1.4", @@ -1001,6 +1594,50 @@ }, "time": "2021-05-03T11:20:27+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, { "name": "resque/php-resque", "version": "v1.3.6", @@ -1141,17 +1778,84 @@ "time": "2021-06-04T20:33:46+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -1160,7 +1864,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1205,7 +1909,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -1221,27 +1925,27 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "utopia-php/abuse", - "version": "0.31.0", + "version": "0.31.1", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "d771c2c8d7d1237b1d04b5bf57b07a9b4736e627" + "reference": "b2ad372d1070f55f9545cb811b6ed2d40094e6dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/d771c2c8d7d1237b1d04b5bf57b07a9b4736e627", - "reference": "d771c2c8d7d1237b1d04b5bf57b07a9b4736e627", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/b2ad372d1070f55f9545cb811b6ed2d40094e6dd", + "reference": "b2ad372d1070f55f9545cb811b6ed2d40094e6dd", "shasum": "" }, "require": { "ext-curl": "*", "ext-pdo": "*", "php": ">=8.0", - "utopia-php/database": "0.42.*" + "utopia-php/database": "0.43.*" }, "require-dev": { "laravel/pint": "1.5.*", @@ -1268,9 +1972,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.31.0" + "source": "https://github.com/utopia-php/abuse/tree/0.31.1" }, - "time": "2023-08-11T01:17:15+00:00" + "time": "2023-08-29T11:07:46+00:00" }, { "name": "utopia-php/analytics", @@ -1320,21 +2024,21 @@ }, { "name": "utopia-php/audit", - "version": "0.33.0", + "version": "0.33.1", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "6fb82331c58c66cbdb8a419314a687fcb18a1d22" + "reference": "c117e8e9ce4e3e1b369e8b5b55b2d6ab3138eadd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/6fb82331c58c66cbdb8a419314a687fcb18a1d22", - "reference": "6fb82331c58c66cbdb8a419314a687fcb18a1d22", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/c117e8e9ce4e3e1b369e8b5b55b2d6ab3138eadd", + "reference": "c117e8e9ce4e3e1b369e8b5b55b2d6ab3138eadd", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/database": "0.42.*" + "utopia-php/database": "0.43.*" }, "require-dev": { "laravel/pint": "1.5.*", @@ -1361,9 +2065,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.33.0" + "source": "https://github.com/utopia-php/audit/tree/0.33.1" }, - "time": "2023-08-11T01:17:28+00:00" + "time": "2023-08-29T11:07:40+00:00" }, { "name": "utopia-php/cache", @@ -1516,19 +2220,20 @@ }, { "name": "utopia-php/database", - "version": "0.42.1", + "version": "0.43.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "9ff69a9b9eadc581771798833d423829c9d8cc90" + "reference": "fb96fc6c94d5efcd43913c34bece62daba76a5e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/9ff69a9b9eadc581771798833d423829c9d8cc90", - "reference": "9ff69a9b9eadc581771798833d423829c9d8cc90", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fb96fc6c94d5efcd43913c34bece62daba76a5e9", + "reference": "fb96fc6c94d5efcd43913c34bece62daba76a5e9", "shasum": "" }, "require": { + "ext-mbstring": "*", "ext-pdo": "*", "php": ">=8.0", "utopia-php/cache": "0.8.*", @@ -1566,29 +2271,31 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.42.1" + "source": "https://github.com/utopia-php/database/tree/0.43.0" }, - "time": "2023-08-14T16:09:09+00:00" + "time": "2023-08-29T10:18:39+00:00" }, { "name": "utopia-php/domains", - "version": "v1.1.0", + "version": "0.3.2", "source": { "type": "git", "url": "https://github.com/utopia-php/domains.git", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" + "reference": "aaa8c9a96c69ccb397997b1f4f2299c66f77eefb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/aaa8c9a96c69ccb397997b1f4f2299c66f77eefb", + "reference": "aaa8c9a96c69ccb397997b1f4f2299c66f77eefb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0", + "utopia-php/framework": "0.*.*" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3" }, "type": "library", "autoload": { @@ -1604,6 +2311,10 @@ { "name": "Eldad Fux", "email": "eldad@appwrite.io" + }, + { + "name": "Wess Cope", + "email": "wess@appwrite.io" } ], "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", @@ -1620,9 +2331,9 @@ ], "support": { "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/master" + "source": "https://github.com/utopia-php/domains/tree/0.3.2" }, - "time": "2020-02-23T07:40:02+00:00" + "time": "2023-07-19T16:39:24+00:00" }, { "name": "utopia-php/dsn", @@ -1673,16 +2384,16 @@ }, { "name": "utopia-php/framework", - "version": "0.28.4", + "version": "0.31.0", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "98c5469efe195aeecc63745dbf8e2f357f8cedac" + "reference": "207f77378965fca9a9bc3783ea379d3549f86bc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/98c5469efe195aeecc63745dbf8e2f357f8cedac", - "reference": "98c5469efe195aeecc63745dbf8e2f357f8cedac", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/207f77378965fca9a9bc3783ea379d3549f86bc0", + "reference": "207f77378965fca9a9bc3783ea379d3549f86bc0", "shasum": "" }, "require": { @@ -1690,9 +2401,9 @@ }, "require-dev": { "laravel/pint": "^1.2", - "phpstan/phpstan": "1.9.x-dev", - "phpunit/phpunit": "^9.5.25", - "vimeo/psalm": "4.27.0" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.25" }, "type": "library", "autoload": { @@ -1712,9 +2423,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.28.4" + "source": "https://github.com/utopia-php/framework/tree/0.31.0" }, - "time": "2023-06-03T14:09:22+00:00" + "time": "2023-08-30T16:10:04+00:00" }, { "name": "utopia-php/image", @@ -1920,6 +2631,64 @@ }, "time": "2023-02-07T05:42:46+00:00" }, + { + "name": "utopia-php/migration", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/migration.git", + "reference": "49a28adfbb781f0c08f1eaf459a8fbb8ab9fcc70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/49a28adfbb781f0c08f1eaf459a8fbb8ab9fcc70", + "reference": "49a28adfbb781f0c08f1eaf459a8fbb8ab9fcc70", + "shasum": "" + }, + "require": { + "appwrite/appwrite": "^8.0", + "php": ">=8.0", + "utopia-php/cli": "^0.15.0" + }, + "require-dev": { + "laravel/pint": "^1.10", + "phpunit/phpunit": "^9.3", + "vlucas/phpdotenv": "^5.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Migration\\": "src/Migration" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Bradley Schofield", + "email": "bradley@appwrite.io" + } + ], + "description": "A simple library to migrate resources between services.", + "keywords": [ + "framework", + "migration", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/migration/issues", + "source": "https://github.com/utopia-php/migration/tree/0.3.2" + }, + "time": "2023-08-31T04:11:35+00:00" + }, { "name": "utopia-php/mongo", "version": "0.2.0", @@ -2032,16 +2801,16 @@ }, { "name": "utopia-php/platform", - "version": "0.4.0", + "version": "0.4.2", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "a2a91940314dc7e23ae0b487be456ca508920e7f" + "reference": "6e3d6db9ee8f99e36c2df331b58de2e6e3e37eb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/a2a91940314dc7e23ae0b487be456ca508920e7f", - "reference": "a2a91940314dc7e23ae0b487be456ca508920e7f", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/6e3d6db9ee8f99e36c2df331b58de2e6e3e37eb9", + "reference": "6e3d6db9ee8f99e36c2df331b58de2e6e3e37eb9", "shasum": "" }, "require": { @@ -2049,7 +2818,7 @@ "ext-redis": "*", "php": ">=8.0", "utopia-php/cli": "0.15.*", - "utopia-php/framework": "0.28.*" + "utopia-php/framework": "0.31.*" }, "require-dev": { "laravel/pint": "1.2.*", @@ -2075,9 +2844,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.4.0" + "source": "https://github.com/utopia-php/platform/tree/0.4.2" }, - "time": "2023-05-30T07:18:41+00:00" + "time": "2023-08-30T16:28:31+00:00" }, { "name": "utopia-php/pools", @@ -2351,28 +3120,28 @@ }, { "name": "utopia-php/swoole", - "version": "0.8.0", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/swoole.git", - "reference": "5b60e7f730641cc182bc36b1f9939d4a76d3439b" + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/swoole/zipball/5b60e7f730641cc182bc36b1f9939d4a76d3439b", - "reference": "5b60e7f730641cc182bc36b1f9939d4a76d3439b", + "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", "shasum": "" }, "require": { "ext-swoole": "*", "php": ">=8.0", - "utopia-php/framework": "0.28.*" + "utopia-php/framework": "0.*.*" }, "require-dev": { "laravel/pint": "1.2.*", - "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.3", - "swoole/ide-helper": "5.0.2" + "swoole/ide-helper": "4.8.3", + "vimeo/psalm": "4.15.0" }, "type": "library", "autoload": { @@ -2396,27 +3165,27 @@ ], "support": { "issues": "https://github.com/utopia-php/swoole/issues", - "source": "https://github.com/utopia-php/swoole/tree/0.8.0" + "source": "https://github.com/utopia-php/swoole/tree/0.5.0" }, - "time": "2023-07-25T10:29:58+00:00" + "time": "2022-10-19T22:19:07+00:00" }, { "name": "utopia-php/system", - "version": "0.6.0", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/utopia-php/system.git", - "reference": "289c4327713deadc9c748b5317d248133a02f245" + "reference": "01bf0d283aded0ee0a7a6e5ff540acf64270ab27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", - "reference": "289c4327713deadc9c748b5317d248133a02f245", + "url": "https://api.github.com/repos/utopia-php/system/zipball/01bf0d283aded0ee0a7a6e5ff540acf64270ab27", + "reference": "01bf0d283aded0ee0a7a6e5ff540acf64270ab27", "shasum": "" }, "require": { "laravel/pint": "1.2.*", - "php": ">=7.4" + "php": ">=8.0.0" }, "require-dev": { "phpunit/phpunit": "^9.3", @@ -2453,9 +3222,58 @@ ], "support": { "issues": "https://github.com/utopia-php/system/issues", - "source": "https://github.com/utopia-php/system/tree/0.6.0" + "source": "https://github.com/utopia-php/system/tree/0.7.1" }, - "time": "2022-11-07T13:51:59+00:00" + "time": "2023-08-30T09:14:37+00:00" + }, + { + "name": "utopia-php/vcs", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/vcs.git", + "reference": "08078af30865827adb8aafb32929c968ce541a28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/vcs/zipball/08078af30865827adb8aafb32929c968ce541a28", + "reference": "08078af30865827adb8aafb32929c968ce541a28", + "shasum": "" + }, + "require": { + "adhocore/jwt": "^1.1", + "php": ">=8.0", + "utopia-php/cache": "^0.8.0", + "utopia-php/framework": "0.31.*" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\VCS\\": "src/VCS", + "Utopia\\Detector\\": "src/Detector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library to integrate version control systems like GitHub, GitLab etc. to receive webhook events", + "keywords": [ + "framework", + "php", + "utopia", + "vcs" + ], + "support": { + "issues": "https://github.com/utopia-php/vcs/issues", + "source": "https://github.com/utopia-php/vcs/tree/0.4.0" + }, + "time": "2023-08-30T16:17:03+00:00" }, { "name": "utopia-php/websocket", @@ -2642,16 +3460,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.33.7", + "version": "0.34.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "9f5db4a637b23879ceacea9ed2d33b0486771ffc" + "reference": "81538d10abacd81350c265b516c72ef315116013" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/9f5db4a637b23879ceacea9ed2d33b0486771ffc", - "reference": "9f5db4a637b23879ceacea9ed2d33b0486771ffc", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/81538d10abacd81350c265b516c72ef315116013", + "reference": "81538d10abacd81350c265b516c72ef315116013", "shasum": "" }, "require": { @@ -2687,9 +3505,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.33.7" + "source": "https://github.com/appwrite/sdk-generator/tree/0.34.1" }, - "time": "2023-07-12T12:15:43+00:00" + "time": "2023-08-30T07:57:31+00:00" }, { "name": "doctrine/deprecations", @@ -4918,16 +5736,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -4942,7 +5760,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4980,7 +5798,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -4996,20 +5814,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -5024,7 +5842,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5063,7 +5881,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -5079,7 +5897,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "textalk/websocket", @@ -5182,16 +6000,16 @@ }, { "name": "twig/twig", - "version": "v3.7.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "5cf942bbab3df42afa918caeba947f1b690af64b" + "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b", - "reference": "5cf942bbab3df42afa918caeba947f1b690af64b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", + "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", "shasum": "" }, "require": { @@ -5201,7 +6019,7 @@ }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + "symfony/phpunit-bridge": "^5.4.9|^6.3" }, "type": "library", "autoload": { @@ -5237,7 +6055,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.7.0" + "source": "https://github.com/twigphp/Twig/tree/v3.7.1" }, "funding": [ { @@ -5249,7 +6067,7 @@ "type": "tidelift" } ], - "time": "2023-07-26T07:16:09+00:00" + "time": "2023-08-28T11:09:02+00:00" } ], "aliases": [], diff --git a/docker-compose.yml b/docker-compose.yml index 7b37f9fed7..b27c3581af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,7 +53,6 @@ services: DEBUG: false TESTING: true VERSION: dev - VITE_CONSOLE_MODE: cloud ports: - 9501:80 networks: @@ -97,14 +96,10 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_SERVER_MULTIPROCESS=enabled - _APP_LOCALE - _APP_CONSOLE_WHITELIST_ROOT - _APP_CONSOLE_WHITELIST_EMAILS - - _APP_CONSOLE_WHITELIST_CODES - _APP_CONSOLE_WHITELIST_IPS - - _APP_CONSOLE_INVITES - - _APP_CONSOLE_ROOT_SESSION - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS @@ -114,35 +109,50 @@ services: - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_DOMAIN_FUNCTIONS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_CONNECTIONS_PUBSUB - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE - _APP_SMTP_USERNAME - _APP_SMTP_PASSWORD - - _APP_USERS_STATS_RECIPIENTS - _APP_USAGE_STATS + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT - _APP_STORAGE_LIMIT - _APP_STORAGE_PREVIEW_LIMIT - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT - - _APP_CONNECTIONS_STORAGE + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_FUNCTIONS_SIZE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_BUILD_TIMEOUT @@ -153,6 +163,8 @@ services: - _APP_EXECUTOR_HOST - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + - _APP_STATSD_HOST + - _APP_STATSD_PORT - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE @@ -161,12 +173,18 @@ services: - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - _APP_SMS_PROVIDER - _APP_SMS_FROM - - _APP_REGION - _APP_GRAPHQL_MAX_BATCH_SIZE - _APP_GRAPHQL_MAX_COMPLEXITY - _APP_GRAPHQL_MAX_DEPTH - - _APP_CONSOLE_GITHUB_APP_ID - - _APP_CONSOLE_GITHUB_SECRET + - _APP_VCS_GITHUB_APP_NAME + - _APP_VCS_GITHUB_PRIVATE_KEY + - _APP_VCS_GITHUB_APP_ID + - _APP_VCS_GITHUB_WEBHOOK_SECRET + - _APP_VCS_GITHUB_CLIENT_SECRET + - _APP_VCS_GITHUB_CLIENT_ID + - _APP_MIGRATIONS_FIREBASE_CLIENT_ID + - _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET + - _APP_ASSISTANT_OPENAI_API_KEY appwrite-realtime: entrypoint: realtime @@ -202,25 +220,17 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_SERVER_MULTIPROCESS=enabled - _APP_OPTIONS_ABUSE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_PUBSUB - - _APP_CONNECTIONS_QUEUE - _APP_USAGE_STATS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -242,19 +252,15 @@ services: - _APP_ENV - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -275,15 +281,12 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -308,23 +311,37 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_CONNECTIONS_STORAGE + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET @@ -346,22 +363,16 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -372,7 +383,9 @@ services: image: appwrite-dev networks: - appwrite - volumes: + volumes: + - appwrite-functions:/storage/functions:rw + - appwrite-builds:/storage/builds:rw - ./app:/usr/src/code/app - ./src:/usr/src/code/src depends_on: @@ -381,27 +394,29 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_CONNECTIONS_STORAGE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + - _APP_VCS_GITHUB_APP_NAME + - _APP_VCS_GITHUB_PRIVATE_KEY + - _APP_VCS_GITHUB_APP_ID + - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CPUS + - _APP_FUNCTIONS_MEMORY + - _APP_OPTIONS_FORCE_HTTPS + - _APP_DOMAIN appwrite-worker-certificates: entrypoint: worker-certificates @@ -421,25 +436,20 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_DOMAIN_FUNCTIONS - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -460,23 +470,20 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CPUS + - _APP_FUNCTIONS_MEMORY - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST - _APP_USAGE_STATS @@ -502,8 +509,6 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS @@ -511,7 +516,6 @@ services: - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_QUEUE - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE @@ -536,51 +540,49 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_QUEUE - _APP_SMS_PROVIDER - _APP_SMS_FROM - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - appwrite-hamster: - entrypoint: hamster + appwrite-worker-migrations: + entrypoint: worker-migrations <<: *x-logging - container_name: appwrite-hamster + container_name: appwrite-worker-migrations + restart: unless-stopped image: appwrite-dev networks: - appwrite volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src + - ./tests:/usr/src/code/tests depends_on: - - redis + - mariadb environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_DOMAIN + - _APP_DOMAIN_TARGET + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_HAMSTER_INTERVAL - - _APP_HAMSTER_TIME - - _APP_MIXPANEL_TOKEN + - _APP_LOGGING_PROVIDER + - _APP_LOGGING_CONFIG + - _APP_MIGRATIONS_FIREBASE_CLIENT_ID + - _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET appwrite-maintenance: entrypoint: maintenance @@ -597,62 +599,57 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_DOMAIN_FUNCTIONS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE - _APP_MAINTENANCE_RETENTION_ABUSE - _APP_MAINTENANCE_RETENTION_AUDIT + - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - _APP_MAINTENANCE_RETENTION_SCHEDULES - appwrite-worker-usage: - entrypoint: worker-usage + appwrite-usage: + entrypoint: usage <<: *x-logging - container_name: appwrite-worker-usage + container_name: appwrite-usage image: appwrite-dev networks: - appwrite volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src + - ./dev:/usr/local/dev depends_on: - - redis + - influxdb - mariadb environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT + - _APP_USAGE_AGGREGATION_INTERVAL - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_USAGE_STATS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -673,8 +670,6 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER @@ -684,26 +679,21 @@ services: - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_REGION appwrite-assistant: container_name: appwrite-assistant - image: appwrite/assistant:0.1.0 + image: appwrite/assistant:0.2.0 networks: - appwrite environment: - - OPENAI_API_KEY + - _APP_ASSISTANT_OPENAI_API_KEY openruntimes-executor: container_name: openruntimes-executor - hostname: exc1 + hostname: executor <<: *x-logging stop_signal: SIGINT - image: openruntimes/executor:0.1.6 + image: openruntimes/executor:0.3.5 networks: - appwrite - runtimes @@ -711,9 +701,10 @@ services: - /var/run/docker.sock:/var/run/docker.sock - appwrite-builds:/storage/builds:rw - appwrite-functions:/storage/functions:rw + # Host mount nessessary to share files between executor and runtimes. + # It's not possible to share mount file between 2 containers without host mount (copying is too slow) - /tmp:/tmp:rw environment: - - OPR_EXECUTOR_CONNECTION_STORAGE=$_APP_CONNECTIONS_STORAGE - OPR_EXECUTOR_INACTIVE_TRESHOLD=$_APP_FUNCTIONS_INACTIVE_THRESHOLD - OPR_EXECUTOR_MAINTENANCE_INTERVAL=$_APP_FUNCTIONS_MAINTENANCE_INTERVAL - OPR_EXECUTOR_NETWORK=$_APP_FUNCTIONS_RUNTIMES_NETWORK @@ -724,6 +715,49 @@ services: - OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET - OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER - OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG + - OPR_EXECUTOR_STORAGE_DEVICE=$_APP_STORAGE_DEVICE + - OPR_EXECUTOR_STORAGE_S3_ACCESS_KEY=$_APP_STORAGE_S3_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_S3_SECRET=$_APP_STORAGE_S3_SECRET + - OPR_EXECUTOR_STORAGE_S3_REGION=$_APP_STORAGE_S3_REGION + - OPR_EXECUTOR_STORAGE_S3_BUCKET=$_APP_STORAGE_S3_BUCKET + - OPR_EXECUTOR_STORAGE_DO_SPACES_ACCESS_KEY=$_APP_STORAGE_DO_SPACES_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_DO_SPACES_SECRET=$_APP_STORAGE_DO_SPACES_SECRET + - OPR_EXECUTOR_STORAGE_DO_SPACES_REGION=$_APP_STORAGE_DO_SPACES_REGION + - OPR_EXECUTOR_STORAGE_DO_SPACES_BUCKET=$_APP_STORAGE_DO_SPACES_BUCKET + - OPR_EXECUTOR_STORAGE_BACKBLAZE_ACCESS_KEY=$_APP_STORAGE_BACKBLAZE_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_BACKBLAZE_SECRET=$_APP_STORAGE_BACKBLAZE_SECRET + - OPR_EXECUTOR_STORAGE_BACKBLAZE_REGION=$_APP_STORAGE_BACKBLAZE_REGION + - OPR_EXECUTOR_STORAGE_BACKBLAZE_BUCKET=$_APP_STORAGE_BACKBLAZE_BUCKET + - OPR_EXECUTOR_STORAGE_LINODE_ACCESS_KEY=$_APP_STORAGE_LINODE_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_LINODE_SECRET=$_APP_STORAGE_LINODE_SECRET + - OPR_EXECUTOR_STORAGE_LINODE_REGION=$_APP_STORAGE_LINODE_REGION + - OPR_EXECUTOR_STORAGE_LINODE_BUCKET=$_APP_STORAGE_LINODE_BUCKET + - OPR_EXECUTOR_STORAGE_WASABI_ACCESS_KEY=$_APP_STORAGE_WASABI_ACCESS_KEY + - OPR_EXECUTOR_STORAGE_WASABI_SECRET=$_APP_STORAGE_WASABI_SECRET + - OPR_EXECUTOR_STORAGE_WASABI_REGION=$_APP_STORAGE_WASABI_REGION + - OPR_EXECUTOR_STORAGE_WASABI_BUCKET=$_APP_STORAGE_WASABI_BUCKET + + openruntimes-proxy: + container_name: openruntimes-proxy + hostname: proxy + <<: *x-logging + stop_signal: SIGINT + image: openruntimes/proxy:0.3.0 + networks: + - appwrite + - runtimes + environment: + - OPR_PROXY_WORKER_PER_CORE=$_APP_WORKER_PER_CORE + - OPR_PROXY_ENV=$_APP_ENV + - OPR_PROXY_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET + - OPR_PROXY_SECRET=$_APP_EXECUTOR_SECRET + - OPR_PROXY_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER + - OPR_PROXY_LOGGING_CONFIG=$_APP_LOGGING_CONFIG + - OPR_PROXY_ALGORITHM=random + - OPR_PROXY_EXECUTORS=executor + - OPR_PROXY_HEALTHCHECK_INTERVAL=10000 + - OPR_PROXY_MAX_TIMEOUT=600 + - OPR_PROXY_HEALTHCHECK=enabled mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p @@ -740,11 +774,13 @@ services: - MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_USER=${_APP_DB_USER} - MYSQL_PASSWORD=${_APP_DB_PASS} - command: 'mysqld --innodb-flush-method=fsync --max_connections=${_APP_CONNECTIONS_MAX}' + command: 'mysqld --innodb-flush-method=fsync' # add ' --query_cache_size=0' for DB tests + # command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu # smtp: # image: appwrite/smtp:1.2.0 # container_name: appwrite-smtp + # restart: unless-stopped # networks: # - appwrite # environment: @@ -776,6 +812,26 @@ services: # - appwrite # volumes: # - appwrite-uploads:/storage/uploads + + influxdb: + image: appwrite/influxdb:1.5.0 + container_name: appwrite-influxdb + <<: *x-logging + networks: + - appwrite + volumes: + - appwrite-influxdb:/var/lib/influxdb:rw + + telegraf: + image: appwrite/telegraf:1.4.0 + container_name: appwrite-telegraf + <<: *x-logging + networks: + - appwrite + environment: + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT + # Dev Tools Start ------------------------------------------------------------------------------------------ # # The Appwrite Team uses the following tools to help debug, monitor and diagnose the Appwrite stack @@ -786,6 +842,7 @@ services: # RequestCatcher - An HTTP server. Catches all system https calls and displays them using a simple HTTP API. Used to debug & tests webhooks and HTTP tasks # RedisCommander - A nice UI for exploring Redis data # Resque - A nice UI for exploring Redis pub/sub, view the different queues workloads, pending and failed tasks + # Chronograf - A nice UI for exploring InfluxDB data # Webgrind - A nice UI for exploring and debugging code-level stuff maildev: # used mainly for dev tests @@ -810,26 +867,15 @@ services: image: adminer container_name: appwrite-adminer <<: *x-logging + restart: always ports: - 9506:8080 networks: - appwrite - - # appwrite-volume-sync: - # entrypoint: volume-sync - # <<: *x-logging - # container_name: appwrite-volume-sync - # image: appwrite-dev - # command: - # - --source=/data/src/ --destination=/data/dest/ --interval=10 - # networks: - # - appwrite - # # volumes: # Mount the rsync source and destination directories - # # - /nfs/config:/data/src - # # - /storage/config:/data/dest # redis-commander: # image: rediscommander/redis-commander:latest + # restart: unless-stopped # networks: # - appwrite # environment: @@ -839,6 +885,7 @@ services: # resque: # image: appwrite/resque-web:1.1.0 + # restart: unless-stopped # networks: # - appwrite # ports: @@ -848,6 +895,26 @@ services: # - RESQUE_WEB_PORT=6379 # - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user # - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password + + # chronograf: + # image: chronograf:1.6 + # container_name: appwrite-chronograf + # restart: unless-stopped + # networks: + # - appwrite + # volumes: + # - appwrite-chronograf:/var/lib/chronograf + # ports: + # - "8888:8888" + # environment: + # - INFLUXDB_URL=http://influxdb:8086 + # - KAPACITOR_URL=http://kapacitor:9092 + # - AUTH_DURATION=48h + # - TOKEN_SECRET=duperduper5674829!jwt + # - GH_CLIENT_ID=d86f7145a41eacfc52cc + # - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab + # - GH_ORGS=appwrite + # webgrind: # image: 'jokkedk/webgrind:latest' # volumes: @@ -885,4 +952,6 @@ volumes: appwrite-certificates: appwrite-functions: appwrite-builds: + appwrite-influxdb: appwrite-config: + # appwrite-chronograf: diff --git a/docs/examples/1.4.x/client-android/java/account/create-anonymous-session.md b/docs/examples/1.4.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..59c76309e7 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/create-email-session.md b/docs/examples/1.4.x/client-android/java/account/create-email-session.md new file mode 100644 index 0000000000..e3e6fdd007 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-email-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createEmailSession( + "email@example.com", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/create-j-w-t.md b/docs/examples/1.4.x/client-android/java/account/create-j-w-t.md new file mode 100644 index 0000000000..c312386018 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-android/java/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..0ed43dc286 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-magic-u-r-l-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createMagicURLSession( + "[USER_ID]", + "email@example.com", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/create-o-auth2session.md b/docs/examples/1.4.x/client-android/java/account/create-o-auth2session.md new file mode 100644 index 0000000000..cb9386a848 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-o-auth2session.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Session( + "amazon", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/create-phone-session.md b/docs/examples/1.4.x/client-android/java/account/create-phone-session.md new file mode 100644 index 0000000000..df5bc86891 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-phone-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createPhoneSession( + "[USER_ID]", + "+12065550100" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/create-phone-verification.md b/docs/examples/1.4.x/client-android/java/account/create-phone-verification.md new file mode 100644 index 0000000000..1545d0f82d --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-phone-verification.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/create-recovery.md b/docs/examples/1.4.x/client-android/java/account/create-recovery.md new file mode 100644 index 0000000000..5e8584fc35 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-recovery.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/create-verification.md b/docs/examples/1.4.x/client-android/java/account/create-verification.md new file mode 100644 index 0000000000..fcea98f66c --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create-verification.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.createVerification( + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/create.md b/docs/examples/1.4.x/client-android/java/account/create.md new file mode 100644 index 0000000000..e08731fd7c --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/create.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.create( + "[USER_ID]", + "email@example.com", + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/delete-identity.md b/docs/examples/1.4.x/client-android/java/account/delete-identity.md new file mode 100644 index 0000000000..0d92d04616 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/delete-identity.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.deleteIdentity( + "[IDENTITY_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/delete-session.md b/docs/examples/1.4.x/client-android/java/account/delete-session.md new file mode 100644 index 0000000000..28009d014d --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/delete-session.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.deleteSession( + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/delete-sessions.md b/docs/examples/1.4.x/client-android/java/account/delete-sessions.md new file mode 100644 index 0000000000..6bdc840cff --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/get-prefs.md b/docs/examples/1.4.x/client-android/java/account/get-prefs.md new file mode 100644 index 0000000000..9911ad30a4 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/get-prefs.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/get-session.md b/docs/examples/1.4.x/client-android/java/account/get-session.md new file mode 100644 index 0000000000..fecb543782 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/get-session.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.getSession( + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/get.md b/docs/examples/1.4.x/client-android/java/account/get.md new file mode 100644 index 0000000000..2e5f40ad24 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/list-identities.md b/docs/examples/1.4.x/client-android/java/account/list-identities.md new file mode 100644 index 0000000000..d1f6a48dee --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/list-identities.md @@ -0,0 +1,20 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.listIdentities( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/list-logs.md b/docs/examples/1.4.x/client-android/java/account/list-logs.md new file mode 100644 index 0000000000..d2ce790bfe --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/list-logs.md @@ -0,0 +1,20 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.listLogs( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/list-sessions.md b/docs/examples/1.4.x/client-android/java/account/list-sessions.md new file mode 100644 index 0000000000..7fd587e1ba --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/list-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/update-email.md b/docs/examples/1.4.x/client-android/java/account/update-email.md new file mode 100644 index 0000000000..8034ada87d --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-email.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-android/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..0f8f2b3c5c --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-name.md b/docs/examples/1.4.x/client-android/java/account/update-name.md new file mode 100644 index 0000000000..5940f93ef2 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-name.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateName( + "[NAME]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-password.md b/docs/examples/1.4.x/client-android/java/account/update-password.md new file mode 100644 index 0000000000..d9426322a4 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-password.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updatePassword( + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-phone-session.md b/docs/examples/1.4.x/client-android/java/account/update-phone-session.md new file mode 100644 index 0000000000..589e4ff509 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-phone-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-phone-verification.md b/docs/examples/1.4.x/client-android/java/account/update-phone-verification.md new file mode 100644 index 0000000000..81785f97c2 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-phone-verification.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updatePhoneVerification( + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-phone.md b/docs/examples/1.4.x/client-android/java/account/update-phone.md new file mode 100644 index 0000000000..a8572f911c --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-phone.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-prefs.md b/docs/examples/1.4.x/client-android/java/account/update-prefs.md new file mode 100644 index 0000000000..ffd5ef03b5 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-prefs.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-recovery.md b/docs/examples/1.4.x/client-android/java/account/update-recovery.md new file mode 100644 index 0000000000..7b0f392176 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateRecovery( + "[USER_ID]", + "[SECRET]", + "password", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-session.md b/docs/examples/1.4.x/client-android/java/account/update-session.md new file mode 100644 index 0000000000..27b8f00668 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-session.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateSession( + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/account/update-status.md b/docs/examples/1.4.x/client-android/java/account/update-status.md new file mode 100644 index 0000000000..1e18ded540 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-status.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/account/update-verification.md b/docs/examples/1.4.x/client-android/java/account/update-verification.md new file mode 100644 index 0000000000..d852dbf838 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/account/update-verification.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Account account = new Account(client); + +account.updateVerification( + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-browser.md b/docs/examples/1.4.x/client-android/java/avatars/get-browser.md new file mode 100644 index 0000000000..f072110236 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + "aa", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-credit-card.md b/docs/examples/1.4.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..0a73312791 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + "amex", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-favicon.md b/docs/examples/1.4.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 0000000000..e0c1cb6b8a --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-flag.md b/docs/examples/1.4.x/client-android/java/avatars/get-flag.md new file mode 100644 index 0000000000..a5f4790640 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + "af", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-image.md b/docs/examples/1.4.x/client-android/java/avatars/get-image.md new file mode 100644 index 0000000000..cdc8ac722b --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-image.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-initials.md b/docs/examples/1.4.x/client-android/java/avatars/get-initials.md new file mode 100644 index 0000000000..c02490c734 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,20 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/avatars/get-q-r.md b/docs/examples/1.4.x/client-android/java/avatars/get-q-r.md new file mode 100644 index 0000000000..2532f204d8 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/avatars/get-q-r.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "[TEXT]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/databases/create-document.md b/docs/examples/1.4.x/client-android/java/databases/create-document.md new file mode 100644 index 0000000000..715e4cdbbe --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/databases/create-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Databases databases = new Databases(client); + +databases.createDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + mapOf( "a" to "b" ), + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/databases/delete-document.md b/docs/examples/1.4.x/client-android/java/databases/delete-document.md new file mode 100644 index 0000000000..1387f48687 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/databases/delete-document.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Databases databases = new Databases(client); + +databases.deleteDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/databases/get-document.md b/docs/examples/1.4.x/client-android/java/databases/get-document.md new file mode 100644 index 0000000000..b1a7161971 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/databases/get-document.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Databases databases = new Databases(client); + +databases.getDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/databases/list-documents.md b/docs/examples/1.4.x/client-android/java/databases/list-documents.md new file mode 100644 index 0000000000..62dc2c7e29 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/databases/list-documents.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Databases databases = new Databases(client); + +databases.listDocuments( + "[DATABASE_ID]", + "[COLLECTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/databases/update-document.md b/docs/examples/1.4.x/client-android/java/databases/update-document.md new file mode 100644 index 0000000000..d1ed59de3b --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/databases/update-document.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Databases databases = new Databases(client); + +databases.updateDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/functions/create-execution.md b/docs/examples/1.4.x/client-android/java/functions/create-execution.md new file mode 100644 index 0000000000..3cce1c37be --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/functions/create-execution.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Functions functions = new Functions(client); + +functions.createExecution( + "[FUNCTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/functions/get-execution.md b/docs/examples/1.4.x/client-android/java/functions/get-execution.md new file mode 100644 index 0000000000..459d74394f --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/functions/get-execution.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Functions functions = new Functions(client); + +functions.getExecution( + "[FUNCTION_ID]", + "[EXECUTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/functions/list-executions.md b/docs/examples/1.4.x/client-android/java/functions/list-executions.md new file mode 100644 index 0000000000..c1f982b707 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/functions/list-executions.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Functions functions = new Functions(client); + +functions.listExecutions( + "[FUNCTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/graphql/mutation.md b/docs/examples/1.4.x/client-android/java/graphql/mutation.md new file mode 100644 index 0000000000..262e513bed --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/graphql/mutation.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/graphql/query.md b/docs/examples/1.4.x/client-android/java/graphql/query.md new file mode 100644 index 0000000000..4291b4735f --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/graphql/query.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/locale/get.md b/docs/examples/1.4.x/client-android/java/locale/get.md new file mode 100644 index 0000000000..4d14be6d73 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-codes.md b/docs/examples/1.4.x/client-android/java/locale/list-codes.md new file mode 100644 index 0000000000..599070ef77 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-continents.md b/docs/examples/1.4.x/client-android/java/locale/list-continents.md new file mode 100644 index 0000000000..6abe97a0a0 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-continents.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-android/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..3c5ca3ae8c --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-countries-e-u.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-countries-phones.md b/docs/examples/1.4.x/client-android/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..81ef94d702 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-countries-phones.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-countries.md b/docs/examples/1.4.x/client-android/java/locale/list-countries.md new file mode 100644 index 0000000000..dc0d5f52c4 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-countries.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-currencies.md b/docs/examples/1.4.x/client-android/java/locale/list-currencies.md new file mode 100644 index 0000000000..7a327b38ae --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-currencies.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/locale/list-languages.md b/docs/examples/1.4.x/client-android/java/locale/list-languages.md new file mode 100644 index 0000000000..0688614b6d --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/locale/list-languages.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.4.x/client-android/java/storage/create-file.md b/docs/examples/1.4.x/client-android/java/storage/create-file.md new file mode 100644 index 0000000000..732b302f63 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/create-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.createFile( + "[BUCKET_ID]", + "[FILE_ID]", + InputFile.fromPath("file.png"), + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/delete-file.md b/docs/examples/1.4.x/client-android/java/storage/delete-file.md new file mode 100644 index 0000000000..69a0f0f844 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/delete-file.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.deleteFile( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/get-file-download.md b/docs/examples/1.4.x/client-android/java/storage/get-file-download.md new file mode 100644 index 0000000000..2ab30dce5a --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileDownload( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/get-file-preview.md b/docs/examples/1.4.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 0000000000..483f2fca16 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.getFilePreview( + "[BUCKET_ID]", + "[FILE_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/get-file-view.md b/docs/examples/1.4.x/client-android/java/storage/get-file-view.md new file mode 100644 index 0000000000..5614b694a5 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileView( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/get-file.md b/docs/examples/1.4.x/client-android/java/storage/get-file.md new file mode 100644 index 0000000000..4ae0de0d9a --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/get-file.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.getFile( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/list-files.md b/docs/examples/1.4.x/client-android/java/storage/list-files.md new file mode 100644 index 0000000000..dedfb6c100 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/list-files.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.listFiles( + "[BUCKET_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/storage/update-file.md b/docs/examples/1.4.x/client-android/java/storage/update-file.md new file mode 100644 index 0000000000..9b4dd92266 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/storage/update-file.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Storage storage = new Storage(client); + +storage.updateFile( + "[BUCKET_ID]", + "[FILE_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/create-membership.md b/docs/examples/1.4.x/client-android/java/teams/create-membership.md new file mode 100644 index 0000000000..6c8b383358 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/create-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.createMembership( + "[TEAM_ID]", + listOf(), + "https://example.com", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/create.md b/docs/examples/1.4.x/client-android/java/teams/create.md new file mode 100644 index 0000000000..263fa57be7 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/create.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.create( + "[TEAM_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/delete-membership.md b/docs/examples/1.4.x/client-android/java/teams/delete-membership.md new file mode 100644 index 0000000000..40f28f0c21 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/delete.md b/docs/examples/1.4.x/client-android/java/teams/delete.md new file mode 100644 index 0000000000..5b4c378b5e --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/delete.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.delete( + "[TEAM_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/get-membership.md b/docs/examples/1.4.x/client-android/java/teams/get-membership.md new file mode 100644 index 0000000000..f2f1d99ae0 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/get-membership.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.getMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/get-prefs.md b/docs/examples/1.4.x/client-android/java/teams/get-prefs.md new file mode 100644 index 0000000000..6963cb40ca --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/get-prefs.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.getPrefs( + "[TEAM_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/get.md b/docs/examples/1.4.x/client-android/java/teams/get.md new file mode 100644 index 0000000000..549af20d34 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/get.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.get( + "[TEAM_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/list-memberships.md b/docs/examples/1.4.x/client-android/java/teams/list-memberships.md new file mode 100644 index 0000000000..3da4e33d51 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/list-memberships.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.listMemberships( + "[TEAM_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/list.md b/docs/examples/1.4.x/client-android/java/teams/list.md new file mode 100644 index 0000000000..b20ad4a211 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/list.md @@ -0,0 +1,20 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.list( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/update-membership-status.md b/docs/examples/1.4.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 0000000000..499251f21f --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/update-membership.md b/docs/examples/1.4.x/client-android/java/teams/update-membership.md new file mode 100644 index 0000000000..6cb334603a --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/update-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + listOf() + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/update-name.md b/docs/examples/1.4.x/client-android/java/teams/update-name.md new file mode 100644 index 0000000000..170ee59015 --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/update-name.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.updateName( + "[TEAM_ID]", + "[NAME]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/java/teams/update-prefs.md b/docs/examples/1.4.x/client-android/java/teams/update-prefs.md new file mode 100644 index 0000000000..a19ad8207e --- /dev/null +++ b/docs/examples/1.4.x/client-android/java/teams/update-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + +Teams teams = new Teams(client); + +teams.updatePrefs( + "[TEAM_ID]", + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-anonymous-session.md b/docs/examples/1.4.x/client-android/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..cdcf401ed9 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createAnonymousSession() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-email-session.md b/docs/examples/1.4.x/client-android/kotlin/account/create-email-session.md new file mode 100644 index 0000000000..ab8d581fd1 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-email-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createEmailSession( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-j-w-t.md b/docs/examples/1.4.x/client-android/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..35e7a6ffd4 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createJWT() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-android/kotlin/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..51368b5392 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createMagicURLSession( + userId = "[USER_ID]", + email = "email@example.com", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-o-auth2session.md b/docs/examples/1.4.x/client-android/kotlin/account/create-o-auth2session.md new file mode 100644 index 0000000000..395bfada00 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-o-auth2session.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +account.createOAuth2Session( + provider = "amazon", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-phone-session.md b/docs/examples/1.4.x/client-android/kotlin/account/create-phone-session.md new file mode 100644 index 0000000000..eed6f7a2e2 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-phone-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createPhoneSession( + userId = "[USER_ID]", + phone = "+12065550100" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-phone-verification.md b/docs/examples/1.4.x/client-android/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..12fb9f74e8 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createPhoneVerification() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-recovery.md b/docs/examples/1.4.x/client-android/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..7d73a671dd --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-recovery.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create-verification.md b/docs/examples/1.4.x/client-android/kotlin/account/create-verification.md new file mode 100644 index 0000000000..b3dc43ac48 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create-verification.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.createVerification( + url = "https://example.com" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/create.md b/docs/examples/1.4.x/client-android/kotlin/account/create.md new file mode 100644 index 0000000000..c72ae90def --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/create.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.create( + userId = "[USER_ID]", + email = "email@example.com", + password = "", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/delete-identity.md b/docs/examples/1.4.x/client-android/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..440333e1cb --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/delete-identity.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.deleteIdentity( + identityId = "[IDENTITY_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/delete-session.md b/docs/examples/1.4.x/client-android/kotlin/account/delete-session.md new file mode 100644 index 0000000000..a98a28661b --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/delete-session.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.deleteSession( + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/delete-sessions.md b/docs/examples/1.4.x/client-android/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..c9afbf1345 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/delete-sessions.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.deleteSessions() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/get-prefs.md b/docs/examples/1.4.x/client-android/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..bd3f81a23f --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/get-prefs.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.getPrefs() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/get-session.md b/docs/examples/1.4.x/client-android/kotlin/account/get-session.md new file mode 100644 index 0000000000..d6d6c72eac --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/get-session.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.getSession( + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/get.md b/docs/examples/1.4.x/client-android/kotlin/account/get.md new file mode 100644 index 0000000000..4c8f0be9de --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/get.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.get() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/list-identities.md b/docs/examples/1.4.x/client-android/kotlin/account/list-identities.md new file mode 100644 index 0000000000..3292b35ff1 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/list-identities.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.listIdentities( +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/list-logs.md b/docs/examples/1.4.x/client-android/kotlin/account/list-logs.md new file mode 100644 index 0000000000..eb337caec0 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/list-logs.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.listLogs( +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/list-sessions.md b/docs/examples/1.4.x/client-android/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..cd9f63bc3c --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/list-sessions.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.listSessions() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-email.md b/docs/examples/1.4.x/client-android/kotlin/account/update-email.md new file mode 100644 index 0000000000..85a0242591 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-email.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateEmail( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-android/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c7286ba6c8 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateMagicURLSession( + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-name.md b/docs/examples/1.4.x/client-android/kotlin/account/update-name.md new file mode 100644 index 0000000000..574f4938d8 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-name.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateName( + name = "[NAME]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-password.md b/docs/examples/1.4.x/client-android/kotlin/account/update-password.md new file mode 100644 index 0000000000..c5338b8694 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-password.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updatePassword( + password = "", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-phone-session.md b/docs/examples/1.4.x/client-android/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..d3b02e04ce --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-phone-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updatePhoneSession( + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-phone-verification.md b/docs/examples/1.4.x/client-android/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..0314f74223 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updatePhoneVerification( + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-phone.md b/docs/examples/1.4.x/client-android/kotlin/account/update-phone.md new file mode 100644 index 0000000000..76eb8aac5e --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-phone.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updatePhone( + phone = "+12065550100", + password = "password" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-prefs.md b/docs/examples/1.4.x/client-android/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..f16e40ba41 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-prefs.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-recovery.md b/docs/examples/1.4.x/client-android/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..9682899bcb --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateRecovery( + userId = "[USER_ID]", + secret = "[SECRET]", + password = "password", + passwordAgain = "password" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-session.md b/docs/examples/1.4.x/client-android/kotlin/account/update-session.md new file mode 100644 index 0000000000..e9e83d0cb0 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-session.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateSession( + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-status.md b/docs/examples/1.4.x/client-android/kotlin/account/update-status.md new file mode 100644 index 0000000000..f7789ea237 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-status.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateStatus() diff --git a/docs/examples/1.4.x/client-android/kotlin/account/update-verification.md b/docs/examples/1.4.x/client-android/kotlin/account/update-verification.md new file mode 100644 index 0000000000..af800c1fc5 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/account/update-verification.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val account = Account(client) + +val response = account.updateVerification( + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-browser.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..b1b2d08183 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-browser.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = "aa", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-credit-card.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..411e05ae51 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-credit-card.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = "amex", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-favicon.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..1a4b217fa4 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-flag.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..5c882d6018 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-flag.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = "af", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-image.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..20d8dff13c --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-image.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-initials.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..70ef9b2909 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-initials.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getInitials( +) diff --git a/docs/examples/1.4.x/client-android/kotlin/avatars/get-q-r.md b/docs/examples/1.4.x/client-android/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..92b17e1163 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/avatars/get-q-r.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "[TEXT]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.4.x/client-android/kotlin/databases/create-document.md new file mode 100644 index 0000000000..d7f1991d39 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/databases/create-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val databases = Databases(client) + +val response = databases.createDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), +) diff --git a/docs/examples/1.4.x/client-android/kotlin/databases/delete-document.md b/docs/examples/1.4.x/client-android/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..c5bf2a2707 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/databases/delete-document.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val databases = Databases(client) + +val response = databases.deleteDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/databases/get-document.md b/docs/examples/1.4.x/client-android/kotlin/databases/get-document.md new file mode 100644 index 0000000000..abdee36316 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/databases/get-document.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val databases = Databases(client) + +val response = databases.getDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/databases/list-documents.md b/docs/examples/1.4.x/client-android/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..f97d8787c9 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/databases/list-documents.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val databases = Databases(client) + +val response = databases.listDocuments( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/databases/update-document.md b/docs/examples/1.4.x/client-android/kotlin/databases/update-document.md new file mode 100644 index 0000000000..3820b8965c --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/databases/update-document.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val databases = Databases(client) + +val response = databases.updateDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.4.x/client-android/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..77d4587755 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/functions/create-execution.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val functions = Functions(client) + +val response = functions.createExecution( + functionId = "[FUNCTION_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/functions/get-execution.md b/docs/examples/1.4.x/client-android/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..b57668679f --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/functions/get-execution.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val functions = Functions(client) + +val response = functions.getExecution( + functionId = "[FUNCTION_ID]", + executionId = "[EXECUTION_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/functions/list-executions.md b/docs/examples/1.4.x/client-android/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..14b613f703 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/functions/list-executions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val functions = Functions(client) + +val response = functions.listExecutions( + functionId = "[FUNCTION_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/graphql/mutation.md b/docs/examples/1.4.x/client-android/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..dc37a3e640 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/graphql/mutation.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val graphql = Graphql(client) + +val response = graphql.mutation( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/client-android/kotlin/graphql/query.md b/docs/examples/1.4.x/client-android/kotlin/graphql/query.md new file mode 100644 index 0000000000..d821070922 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/graphql/query.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val graphql = Graphql(client) + +val response = graphql.query( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/get.md b/docs/examples/1.4.x/client-android/kotlin/locale/get.md new file mode 100644 index 0000000000..a2044c7257 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/get.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.get() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-codes.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..b4e949bb0d --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-codes.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listCodes() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-continents.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..610747ee13 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-continents.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listContinents() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..fa5483f0b0 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listCountriesEU() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-countries-phones.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..6aba463a38 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listCountriesPhones() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-countries.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..c58456b0f5 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-countries.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listCountries() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-currencies.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..2cf064402a --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-currencies.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listCurrencies() diff --git a/docs/examples/1.4.x/client-android/kotlin/locale/list-languages.md b/docs/examples/1.4.x/client-android/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..afc00b1e77 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/locale/list-languages.md @@ -0,0 +1,10 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val locale = Locale(client) + +val response = locale.listLanguages() diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/create-file.md b/docs/examples/1.4.x/client-android/kotlin/storage/create-file.md new file mode 100644 index 0000000000..7bb79ac11e --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/create-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val response = storage.createFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + file = InputFile.fromPath("file.png"), +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/delete-file.md b/docs/examples/1.4.x/client-android/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..9430d7efe3 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/delete-file.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val response = storage.deleteFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/get-file-download.md b/docs/examples/1.4.x/client-android/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..85bd22c9c1 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/get-file-download.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/get-file-preview.md b/docs/examples/1.4.x/client-android/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..c5bbdef419 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/get-file-preview.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/get-file-view.md b/docs/examples/1.4.x/client-android/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..7e7589c079 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/get-file-view.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/get-file.md b/docs/examples/1.4.x/client-android/kotlin/storage/get-file.md new file mode 100644 index 0000000000..8fb6e244e8 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/get-file.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val response = storage.getFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/list-files.md b/docs/examples/1.4.x/client-android/kotlin/storage/list-files.md new file mode 100644 index 0000000000..191a3cc97c --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/list-files.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val response = storage.listFiles( + bucketId = "[BUCKET_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/storage/update-file.md b/docs/examples/1.4.x/client-android/kotlin/storage/update-file.md new file mode 100644 index 0000000000..005270f3e4 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/storage/update-file.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val storage = Storage(client) + +val response = storage.updateFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/create-membership.md b/docs/examples/1.4.x/client-android/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..afc93366be --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/create-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.createMembership( + teamId = "[TEAM_ID]", + roles = listOf(), + url = "https://example.com", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/create.md b/docs/examples/1.4.x/client-android/kotlin/teams/create.md new file mode 100644 index 0000000000..5e70bd8df0 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/create.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.create( + teamId = "[TEAM_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/delete-membership.md b/docs/examples/1.4.x/client-android/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..04ef5d3490 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/delete-membership.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.deleteMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/delete.md b/docs/examples/1.4.x/client-android/kotlin/teams/delete.md new file mode 100644 index 0000000000..7d58960e7c --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/delete.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.delete( + teamId = "[TEAM_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/get-membership.md b/docs/examples/1.4.x/client-android/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..653bd520fa --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/get-membership.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.getMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/get-prefs.md b/docs/examples/1.4.x/client-android/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..bfd8f7597f --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/get-prefs.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.getPrefs( + teamId = "[TEAM_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/get.md b/docs/examples/1.4.x/client-android/kotlin/teams/get.md new file mode 100644 index 0000000000..72aea07f30 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.get( + teamId = "[TEAM_ID]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/list-memberships.md b/docs/examples/1.4.x/client-android/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..53bd6f3b65 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/list-memberships.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.listMemberships( + teamId = "[TEAM_ID]", +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/list.md b/docs/examples/1.4.x/client-android/kotlin/teams/list.md new file mode 100644 index 0000000000..57c5fe8354 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/list.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.list( +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/update-membership-status.md b/docs/examples/1.4.x/client-android/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..33de006871 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.updateMembershipStatus( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/update-membership.md b/docs/examples/1.4.x/client-android/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..40005ed365 --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/update-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.updateMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + roles = listOf() +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/update-name.md b/docs/examples/1.4.x/client-android/kotlin/teams/update-name.md new file mode 100644 index 0000000000..59c681232d --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/update-name.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.updateName( + teamId = "[TEAM_ID]", + name = "[NAME]" +) diff --git a/docs/examples/1.4.x/client-android/kotlin/teams/update-prefs.md b/docs/examples/1.4.x/client-android/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..6a89ac768d --- /dev/null +++ b/docs/examples/1.4.x/client-android/kotlin/teams/update-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +val teams = Teams(client) + +val response = teams.updatePrefs( + teamId = "[TEAM_ID]", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/client-apple/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..9904f6f222 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-email-session.md b/docs/examples/1.4.x/client-apple/examples/account/create-email-session.md new file mode 100644 index 0000000000..311a3b6260 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-email-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-j-w-t.md b/docs/examples/1.4.x/client-apple/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..c18c3c940a --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-apple/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..929396ddc6 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLSession( + userId: "[USER_ID]", + email: "email@example.com" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-o-auth2session.md b/docs/examples/1.4.x/client-apple/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..c84edfc6e7 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-o-auth2session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Session( + provider: "amazon" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-phone-session.md b/docs/examples/1.4.x/client-apple/examples/account/create-phone-session.md new file mode 100644 index 0000000000..caa66c161a --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneSession( + userId: "[USER_ID]", + phone: "+12065550100" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-phone-verification.md b/docs/examples/1.4.x/client-apple/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..b628897c60 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-recovery.md b/docs/examples/1.4.x/client-apple/examples/account/create-recovery.md new file mode 100644 index 0000000000..8d48938a87 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create-verification.md b/docs/examples/1.4.x/client-apple/examples/account/create-verification.md new file mode 100644 index 0000000000..2c96d202d0 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/create.md b/docs/examples/1.4.x/client-apple/examples/account/create.md new file mode 100644 index 0000000000..a7836f8e37 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/create.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "[USER_ID]", + email: "email@example.com", + password: "" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/delete-identity.md b/docs/examples/1.4.x/client-apple/examples/account/delete-identity.md new file mode 100644 index 0000000000..7cd37c9755 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "[IDENTITY_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/delete-session.md b/docs/examples/1.4.x/client-apple/examples/account/delete-session.md new file mode 100644 index 0000000000..316a27d8f7 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/delete-sessions.md b/docs/examples/1.4.x/client-apple/examples/account/delete-sessions.md new file mode 100644 index 0000000000..efb8c7cce1 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/get-prefs.md b/docs/examples/1.4.x/client-apple/examples/account/get-prefs.md new file mode 100644 index 0000000000..5a9fb2e356 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/get-session.md b/docs/examples/1.4.x/client-apple/examples/account/get-session.md new file mode 100644 index 0000000000..66b363574a --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/get-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/get.md b/docs/examples/1.4.x/client-apple/examples/account/get.md new file mode 100644 index 0000000000..f29f83f8e8 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/list-identities.md b/docs/examples/1.4.x/client-apple/examples/account/list-identities.md new file mode 100644 index 0000000000..86d713c2d4 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/list-identities.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let identityList = try await account.listIdentities() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/list-logs.md b/docs/examples/1.4.x/client-apple/examples/account/list-logs.md new file mode 100644 index 0000000000..0c9725555e --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/list-logs.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let logList = try await account.listLogs() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/list-sessions.md b/docs/examples/1.4.x/client-apple/examples/account/list-sessions.md new file mode 100644 index 0000000000..b160c89f9c --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-email.md b/docs/examples/1.4.x/client-apple/examples/account/update-email.md new file mode 100644 index 0000000000..a8c37af946 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-email.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-apple/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..42a7f710b5 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-name.md b/docs/examples/1.4.x/client-apple/examples/account/update-name.md new file mode 100644 index 0000000000..a9d76812b5 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-name.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.updateName( + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-password.md b/docs/examples/1.4.x/client-apple/examples/account/update-password.md new file mode 100644 index 0000000000..bb3c3b0bea --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-password.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.updatePassword( + password: "" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-phone-session.md b/docs/examples/1.4.x/client-apple/examples/account/update-phone-session.md new file mode 100644 index 0000000000..41e26c3935 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-phone-verification.md b/docs/examples/1.4.x/client-apple/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..1c88595dc2 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-phone.md b/docs/examples/1.4.x/client-apple/examples/account/update-phone.md new file mode 100644 index 0000000000..306e8f5a93 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-prefs.md b/docs/examples/1.4.x/client-apple/examples/account/update-prefs.md new file mode 100644 index 0000000000..cc765480c5 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-recovery.md b/docs/examples/1.4.x/client-apple/examples/account/update-recovery.md new file mode 100644 index 0000000000..335dd6aeef --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-session.md b/docs/examples/1.4.x/client-apple/examples/account/update-session.md new file mode 100644 index 0000000000..b71826246d --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-status.md b/docs/examples/1.4.x/client-apple/examples/account/update-status.md new file mode 100644 index 0000000000..3f2d823641 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-status.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.4.x/client-apple/examples/account/update-verification.md b/docs/examples/1.4.x/client-apple/examples/account/update-verification.md new file mode 100644 index 0000000000..36af6b99da --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-browser.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-browser.md new file mode 100644 index 0000000000..19c8d02b6d --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-browser.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getBrowser( + code: "aa" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..d7a680f35e --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-credit-card.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getCreditCard( + code: "amex" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-favicon.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..01a7ec1344 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-flag.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-flag.md new file mode 100644 index 0000000000..eb33c906b6 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-flag.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getFlag( + code: "af" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-image.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-image.md new file mode 100644 index 0000000000..ef0cd36920 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-image.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getImage( + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-initials.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-initials.md new file mode 100644 index 0000000000..1bdd6f058a --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-initials.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getInitials() + diff --git a/docs/examples/1.4.x/client-apple/examples/avatars/get-q-r.md b/docs/examples/1.4.x/client-apple/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..5c801d40bb --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/avatars/get-q-r.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getQR( + text: "[TEXT]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/databases/create-document.md b/docs/examples/1.4.x/client-apple/examples/databases/create-document.md new file mode 100644 index 0000000000..533bbd534c --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/databases/create-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: [:] +) + diff --git a/docs/examples/1.4.x/client-apple/examples/databases/delete-document.md b/docs/examples/1.4.x/client-apple/examples/databases/delete-document.md new file mode 100644 index 0000000000..c9a751294d --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/databases/get-document.md b/docs/examples/1.4.x/client-apple/examples/databases/get-document.md new file mode 100644 index 0000000000..53b71fb4f5 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/databases/get-document.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/databases/list-documents.md b/docs/examples/1.4.x/client-apple/examples/databases/list-documents.md new file mode 100644 index 0000000000..0b375df67a --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/databases/list-documents.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/databases/update-document.md b/docs/examples/1.4.x/client-apple/examples/databases/update-document.md new file mode 100644 index 0000000000..5a943af8c1 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/databases/update-document.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.4.x/client-apple/examples/functions/create-execution.md new file mode 100644 index 0000000000..93702bfdbc --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/functions/create-execution.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/functions/get-execution.md b/docs/examples/1.4.x/client-apple/examples/functions/get-execution.md new file mode 100644 index 0000000000..f1e53cb570 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/functions/list-executions.md b/docs/examples/1.4.x/client-apple/examples/functions/list-executions.md new file mode 100644 index 0000000000..0f182950ee --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/functions/list-executions.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/graphql/mutation.md b/docs/examples/1.4.x/client-apple/examples/graphql/mutation.md new file mode 100644 index 0000000000..d58b881df4 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.4.x/client-apple/examples/graphql/query.md b/docs/examples/1.4.x/client-apple/examples/graphql/query.md new file mode 100644 index 0000000000..0aba98aeb8 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/graphql/query.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/get.md b/docs/examples/1.4.x/client-apple/examples/locale/get.md new file mode 100644 index 0000000000..d12470d66a --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-codes.md b/docs/examples/1.4.x/client-apple/examples/locale/list-codes.md new file mode 100644 index 0000000000..5832aa4ced --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-continents.md b/docs/examples/1.4.x/client-apple/examples/locale/list-continents.md new file mode 100644 index 0000000000..4853f77212 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-apple/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..6e0a4d31d0 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/client-apple/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..b4752eb469 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-countries.md b/docs/examples/1.4.x/client-apple/examples/locale/list-countries.md new file mode 100644 index 0000000000..75369d0606 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-currencies.md b/docs/examples/1.4.x/client-apple/examples/locale/list-currencies.md new file mode 100644 index 0000000000..92eea81275 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.4.x/client-apple/examples/locale/list-languages.md b/docs/examples/1.4.x/client-apple/examples/locale/list-languages.md new file mode 100644 index 0000000000..2184812b1e --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/create-file.md b/docs/examples/1.4.x/client-apple/examples/storage/create-file.md new file mode 100644 index 0000000000..f882420882 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/create-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]", + file: InputFile.fromPath("file.png") +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/delete-file.md b/docs/examples/1.4.x/client-apple/examples/storage/delete-file.md new file mode 100644 index 0000000000..27624b4bc2 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/get-file-download.md b/docs/examples/1.4.x/client-apple/examples/storage/get-file-download.md new file mode 100644 index 0000000000..ca96b31d93 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let byteBuffer = try await storage.getFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/1.4.x/client-apple/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..71c0f31f27 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/get-file-preview.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let byteBuffer = try await storage.getFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/get-file-view.md b/docs/examples/1.4.x/client-apple/examples/storage/get-file-view.md new file mode 100644 index 0000000000..85631efc83 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let byteBuffer = try await storage.getFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/get-file.md b/docs/examples/1.4.x/client-apple/examples/storage/get-file.md new file mode 100644 index 0000000000..fa28b48d64 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/list-files.md b/docs/examples/1.4.x/client-apple/examples/storage/list-files.md new file mode 100644 index 0000000000..51f7fe8f05 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/list-files.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "[BUCKET_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/storage/update-file.md b/docs/examples/1.4.x/client-apple/examples/storage/update-file.md new file mode 100644 index 0000000000..13bf635ec6 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/storage/update-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/create-membership.md b/docs/examples/1.4.x/client-apple/examples/teams/create-membership.md new file mode 100644 index 0000000000..1936f9d113 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "[TEAM_ID]", + roles: [], + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/create.md b/docs/examples/1.4.x/client-apple/examples/teams/create.md new file mode 100644 index 0000000000..c28eec416d --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/create.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "[TEAM_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/delete-membership.md b/docs/examples/1.4.x/client-apple/examples/teams/delete-membership.md new file mode 100644 index 0000000000..186f6ad6fb --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/delete.md b/docs/examples/1.4.x/client-apple/examples/teams/delete.md new file mode 100644 index 0000000000..e7585ec387 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/delete.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/get-membership.md b/docs/examples/1.4.x/client-apple/examples/teams/get-membership.md new file mode 100644 index 0000000000..02ee3dab42 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/get-prefs.md b/docs/examples/1.4.x/client-apple/examples/teams/get-prefs.md new file mode 100644 index 0000000000..bcd65b68c4 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/get.md b/docs/examples/1.4.x/client-apple/examples/teams/get.md new file mode 100644 index 0000000000..c8630adaac --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/get.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/list-memberships.md b/docs/examples/1.4.x/client-apple/examples/teams/list-memberships.md new file mode 100644 index 0000000000..1f8a0ccb73 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/list-memberships.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/list.md b/docs/examples/1.4.x/client-apple/examples/teams/list.md new file mode 100644 index 0000000000..72226d4f5b --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/list.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let teamList = try await teams.list() + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/update-membership-status.md b/docs/examples/1.4.x/client-apple/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..65a899cb1c --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/update-membership.md b/docs/examples/1.4.x/client-apple/examples/teams/update-membership.md new file mode 100644 index 0000000000..1ac7d78f55 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: [] +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/update-name.md b/docs/examples/1.4.x/client-apple/examples/teams/update-name.md new file mode 100644 index 0000000000..357182b103 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "[TEAM_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/client-apple/examples/teams/update-prefs.md b/docs/examples/1.4.x/client-apple/examples/teams/update-prefs.md new file mode 100644 index 0000000000..6cfe79e3a8 --- /dev/null +++ b/docs/examples/1.4.x/client-apple/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "[TEAM_ID]", + prefs: [:] +) + diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/client-flutter/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2f3e7a606c --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-anonymous-session.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createAnonymousSession(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-email-session.md b/docs/examples/1.4.x/client-flutter/examples/account/create-email-session.md new file mode 100644 index 0000000000..52b6b91f19 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-email-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createEmailSession( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-j-w-t.md b/docs/examples/1.4.x/client-flutter/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..c4a61f7c34 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-j-w-t.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createJWT(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-flutter/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..d1b89bf176 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createMagicURLSession( + userId: '[USER_ID]', + email: 'email@example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-o-auth2session.md b/docs/examples/1.4.x/client-flutter/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..e985a92ae0 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-o-auth2session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createOAuth2Session( + provider: 'amazon', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-phone-session.md b/docs/examples/1.4.x/client-flutter/examples/account/create-phone-session.md new file mode 100644 index 0000000000..fcb705c938 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-phone-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createPhoneSession( + userId: '[USER_ID]', + phone: '+12065550100', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-phone-verification.md b/docs/examples/1.4.x/client-flutter/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..76e724d829 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-phone-verification.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createPhoneVerification(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-recovery.md b/docs/examples/1.4.x/client-flutter/examples/account/create-recovery.md new file mode 100644 index 0000000000..361a9f0459 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-recovery.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create-verification.md b/docs/examples/1.4.x/client-flutter/examples/account/create-verification.md new file mode 100644 index 0000000000..d66c3b1a0a --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create-verification.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createVerification( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/create.md b/docs/examples/1.4.x/client-flutter/examples/account/create.md new file mode 100644 index 0000000000..1ff2ae91cb --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/create.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.create( + userId: '[USER_ID]', + email: 'email@example.com', + password: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/delete-identity.md b/docs/examples/1.4.x/client-flutter/examples/account/delete-identity.md new file mode 100644 index 0000000000..c5ea2b39f3 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/delete-identity.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.deleteIdentity( + identityId: '[IDENTITY_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/delete-session.md b/docs/examples/1.4.x/client-flutter/examples/account/delete-session.md new file mode 100644 index 0000000000..9146561070 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/delete-session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.deleteSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/delete-sessions.md b/docs/examples/1.4.x/client-flutter/examples/account/delete-sessions.md new file mode 100644 index 0000000000..4963de4442 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/delete-sessions.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.deleteSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/get-prefs.md b/docs/examples/1.4.x/client-flutter/examples/account/get-prefs.md new file mode 100644 index 0000000000..81eb802d03 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/get-prefs.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.getPrefs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/get-session.md b/docs/examples/1.4.x/client-flutter/examples/account/get-session.md new file mode 100644 index 0000000000..9e0f66ca3f --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/get-session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.getSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/get.md b/docs/examples/1.4.x/client-flutter/examples/account/get.md new file mode 100644 index 0000000000..21192de279 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/get.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/list-identities.md b/docs/examples/1.4.x/client-flutter/examples/account/list-identities.md new file mode 100644 index 0000000000..2f2eed0da3 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/list-identities.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.listIdentities( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/list-logs.md b/docs/examples/1.4.x/client-flutter/examples/account/list-logs.md new file mode 100644 index 0000000000..9f7088a0d8 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/list-logs.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.listLogs( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/list-sessions.md b/docs/examples/1.4.x/client-flutter/examples/account/list-sessions.md new file mode 100644 index 0000000000..6f2d5dc18d --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/list-sessions.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.listSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-email.md b/docs/examples/1.4.x/client-flutter/examples/account/update-email.md new file mode 100644 index 0000000000..1fb9a3fe7a --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-email.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateEmail( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-flutter/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3c7ef8f0f2 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateMagicURLSession( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-name.md b/docs/examples/1.4.x/client-flutter/examples/account/update-name.md new file mode 100644 index 0000000000..ae5d6235d1 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-name.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateName( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-password.md b/docs/examples/1.4.x/client-flutter/examples/account/update-password.md new file mode 100644 index 0000000000..b5e86de273 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-password.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePassword( + password: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-phone-session.md b/docs/examples/1.4.x/client-flutter/examples/account/update-phone-session.md new file mode 100644 index 0000000000..1f979265b5 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-phone-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePhoneSession( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-phone-verification.md b/docs/examples/1.4.x/client-flutter/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..86d9b0fdfc --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-phone-verification.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePhoneVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-phone.md b/docs/examples/1.4.x/client-flutter/examples/account/update-phone.md new file mode 100644 index 0000000000..edfe47850b --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-phone.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePhone( + phone: '+12065550100', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-prefs.md b/docs/examples/1.4.x/client-flutter/examples/account/update-prefs.md new file mode 100644 index 0000000000..9769708147 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePrefs( + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-recovery.md b/docs/examples/1.4.x/client-flutter/examples/account/update-recovery.md new file mode 100644 index 0000000000..f499b18770 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-recovery.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateRecovery( + userId: '[USER_ID]', + secret: '[SECRET]', + password: 'password', + passwordAgain: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-session.md b/docs/examples/1.4.x/client-flutter/examples/account/update-session.md new file mode 100644 index 0000000000..fb1afcc526 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-status.md b/docs/examples/1.4.x/client-flutter/examples/account/update-status.md new file mode 100644 index 0000000000..8e734647fb --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-status.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateStatus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/account/update-verification.md b/docs/examples/1.4.x/client-flutter/examples/account/update-verification.md new file mode 100644 index 0000000000..fba8ed65bb --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/account/update-verification.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-browser.md new file mode 100644 index 0000000000..70af56659b --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-browser.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getBrowser( + code: 'aa', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getBrowser( + code: 'aa', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..6a29dc8173 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-credit-card.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getCreditCard( + code: 'amex', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getCreditCard( + code: 'amex', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-favicon.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..2da0f2e056 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-favicon.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getFavicon( + url: 'https://example.com', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getFavicon( + url: 'https://example.com', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-flag.md new file mode 100644 index 0000000000..13367885d0 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-flag.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getFlag( + code: 'af', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getFlag( + code: 'af', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-image.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-image.md new file mode 100644 index 0000000000..debbf1e290 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-image.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getImage( + url: 'https://example.com', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getImage( + url: 'https://example.com', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-initials.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-initials.md new file mode 100644 index 0000000000..b0f49c6213 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-initials.md @@ -0,0 +1,32 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getInitials( + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getInitials( + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/avatars/get-q-r.md b/docs/examples/1.4.x/client-flutter/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..8df729379e --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/avatars/get-q-r.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getQR( + text: '[TEXT]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getQR( + text: '[TEXT]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.4.x/client-flutter/examples/databases/create-document.md new file mode 100644 index 0000000000..6a031738d5 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/databases/create-document.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = databases.createDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/databases/delete-document.md b/docs/examples/1.4.x/client-flutter/examples/databases/delete-document.md new file mode 100644 index 0000000000..a377b02747 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/databases/delete-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = databases.deleteDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/databases/get-document.md b/docs/examples/1.4.x/client-flutter/examples/databases/get-document.md new file mode 100644 index 0000000000..b2cf89a3fc --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/databases/get-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = databases.getDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/databases/list-documents.md b/docs/examples/1.4.x/client-flutter/examples/databases/list-documents.md new file mode 100644 index 0000000000..4cd69e301a --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/databases/list-documents.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = databases.listDocuments( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/databases/update-document.md b/docs/examples/1.4.x/client-flutter/examples/databases/update-document.md new file mode 100644 index 0000000000..595099bcb1 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/databases/update-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = databases.updateDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.4.x/client-flutter/examples/functions/create-execution.md new file mode 100644 index 0000000000..b188c32f47 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.createExecution( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/functions/get-execution.md b/docs/examples/1.4.x/client-flutter/examples/functions/get-execution.md new file mode 100644 index 0000000000..f30b4b4495 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/functions/get-execution.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.getExecution( + functionId: '[FUNCTION_ID]', + executionId: '[EXECUTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/functions/list-executions.md b/docs/examples/1.4.x/client-flutter/examples/functions/list-executions.md new file mode 100644 index 0000000000..1840f50d7f --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/functions/list-executions.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.listExecutions( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/graphql/mutation.md b/docs/examples/1.4.x/client-flutter/examples/graphql/mutation.md new file mode 100644 index 0000000000..c0bffce70a --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/graphql/mutation.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Graphql graphql = Graphql(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = graphql.mutation( + query: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/graphql/query.md b/docs/examples/1.4.x/client-flutter/examples/graphql/query.md new file mode 100644 index 0000000000..455cb0bd22 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/graphql/query.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Graphql graphql = Graphql(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = graphql.query( + query: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/get.md b/docs/examples/1.4.x/client-flutter/examples/locale/get.md new file mode 100644 index 0000000000..9e9fa96b22 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/get.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-codes.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-codes.md new file mode 100644 index 0000000000..d11cb7bd35 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-codes.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listCodes(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-continents.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-continents.md new file mode 100644 index 0000000000..0ab2a4aba1 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-continents.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listContinents(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..caa32e8562 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-countries-e-u.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listCountriesEU(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..b122eee7d4 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-countries-phones.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listCountriesPhones(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-countries.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-countries.md new file mode 100644 index 0000000000..e6a367ddb8 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-countries.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listCountries(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-currencies.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-currencies.md new file mode 100644 index 0000000000..fcd1e825e3 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-currencies.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listCurrencies(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/locale/list-languages.md b/docs/examples/1.4.x/client-flutter/examples/locale/list-languages.md new file mode 100644 index 0000000000..1fb68aa84f --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/locale/list-languages.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.listLanguages(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/create-file.md b/docs/examples/1.4.x/client-flutter/examples/storage/create-file.md new file mode 100644 index 0000000000..0f5e44f5e8 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/create-file.md @@ -0,0 +1,24 @@ +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.createFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/delete-file.md b/docs/examples/1.4.x/client-flutter/examples/storage/delete-file.md new file mode 100644 index 0000000000..230b73a9ac --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/delete-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.deleteFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/1.4.x/client-flutter/examples/storage/get-file-download.md new file mode 100644 index 0000000000..883b7d69c4 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/get-file-download.md @@ -0,0 +1,36 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/1.4.x/client-flutter/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..f42138bd03 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/get-file-preview.md @@ -0,0 +1,36 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/1.4.x/client-flutter/examples/storage/get-file-view.md new file mode 100644 index 0000000000..4f7c4d962b --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/get-file-view.md @@ -0,0 +1,36 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/get-file.md b/docs/examples/1.4.x/client-flutter/examples/storage/get-file.md new file mode 100644 index 0000000000..681aca41e0 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/get-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.getFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/list-files.md b/docs/examples/1.4.x/client-flutter/examples/storage/list-files.md new file mode 100644 index 0000000000..e574f7bdaa --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/list-files.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.listFiles( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/storage/update-file.md b/docs/examples/1.4.x/client-flutter/examples/storage/update-file.md new file mode 100644 index 0000000000..1170f05cf3 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/storage/update-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.updateFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/create-membership.md b/docs/examples/1.4.x/client-flutter/examples/teams/create-membership.md new file mode 100644 index 0000000000..ac58c5064f --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/create-membership.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/create.md b/docs/examples/1.4.x/client-flutter/examples/teams/create.md new file mode 100644 index 0000000000..bd62ce32ab --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/create.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.create( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/delete-membership.md b/docs/examples/1.4.x/client-flutter/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0febe42121 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/delete-membership.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/delete.md b/docs/examples/1.4.x/client-flutter/examples/teams/delete.md new file mode 100644 index 0000000000..b45d971bf6 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/delete.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/get-membership.md b/docs/examples/1.4.x/client-flutter/examples/teams/get-membership.md new file mode 100644 index 0000000000..28d95a201b --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/get-membership.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.getMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/get-prefs.md b/docs/examples/1.4.x/client-flutter/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e9ae94eb3f --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/get-prefs.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.getPrefs( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/get.md b/docs/examples/1.4.x/client-flutter/examples/teams/get.md new file mode 100644 index 0000000000..0ec7027f89 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/get.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/list-memberships.md b/docs/examples/1.4.x/client-flutter/examples/teams/list-memberships.md new file mode 100644 index 0000000000..cbbc525dc4 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/list-memberships.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.listMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/list.md b/docs/examples/1.4.x/client-flutter/examples/teams/list.md new file mode 100644 index 0000000000..80aa3016c2 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/list.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/update-membership-status.md b/docs/examples/1.4.x/client-flutter/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..ed31f54b20 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/update-membership-status.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.updateMembershipStatus( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/update-membership.md b/docs/examples/1.4.x/client-flutter/examples/teams/update-membership.md new file mode 100644 index 0000000000..669568bd81 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/update-membership.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.updateMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + roles: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/update-name.md b/docs/examples/1.4.x/client-flutter/examples/teams/update-name.md new file mode 100644 index 0000000000..5c794bd99b --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/update-name.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.updateName( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-flutter/examples/teams/update-prefs.md b/docs/examples/1.4.x/client-flutter/examples/teams/update-prefs.md new file mode 100644 index 0000000000..c29cbb9eb1 --- /dev/null +++ b/docs/examples/1.4.x/client-flutter/examples/teams/update-prefs.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.updatePrefs( + teamId: '[TEAM_ID]', + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/client-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..369c487278 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,29 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-email-session.md b/docs/examples/1.4.x/client-graphql/examples/account/create-email-session.md new file mode 100644 index 0000000000..a19d331a02 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-email-session.md @@ -0,0 +1,32 @@ +mutation { + accountCreateEmailSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-j-w-t.md b/docs/examples/1.4.x/client-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-graphql/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..18418aecb9 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +mutation { + accountCreateMagicURLSession( + userId: "[USER_ID]", + email: "email@example.com" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-phone-session.md b/docs/examples/1.4.x/client-graphql/examples/account/create-phone-session.md new file mode 100644 index 0000000000..9897de7651 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-phone-session.md @@ -0,0 +1,12 @@ +mutation { + accountCreatePhoneSession( + userId: "[USER_ID]", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-phone-verification.md b/docs/examples/1.4.x/client-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..200e1c6d3a --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-recovery.md b/docs/examples/1.4.x/client-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..865add6cc5 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create-verification.md b/docs/examples/1.4.x/client-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..22490be6b0 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create-verification.md @@ -0,0 +1,11 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/create.md b/docs/examples/1.4.x/client-graphql/examples/account/create.md new file mode 100644 index 0000000000..d9c13bf901 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/create.md @@ -0,0 +1,24 @@ +mutation { + accountCreate( + userId: "[USER_ID]", + email: "email@example.com", + password: "" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/delete-identity.md b/docs/examples/1.4.x/client-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..9bd9f0fa80 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "[IDENTITY_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/delete-session.md b/docs/examples/1.4.x/client-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..013bfa5946 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "[SESSION_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/delete-sessions.md b/docs/examples/1.4.x/client-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/get-prefs.md b/docs/examples/1.4.x/client-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..6cb48d2b58 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/get-prefs.md @@ -0,0 +1,5 @@ +query { + accountGetPrefs { + data + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/get-session.md b/docs/examples/1.4.x/client-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..2bf4e28c77 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/get-session.md @@ -0,0 +1,31 @@ +query { + accountGetSession( + sessionId: "[SESSION_ID]" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/get.md b/docs/examples/1.4.x/client-graphql/examples/account/get.md new file mode 100644 index 0000000000..39d06b1e1f --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/get.md @@ -0,0 +1,20 @@ +query { + accountGet { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/list-identities.md b/docs/examples/1.4.x/client-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..25c7e71462 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/list-identities.md @@ -0,0 +1,17 @@ +query { + accountListIdentities { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/list-logs.md b/docs/examples/1.4.x/client-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..95fd3bd7f3 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/list-logs.md @@ -0,0 +1,28 @@ +query { + accountListLogs { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/list-sessions.md b/docs/examples/1.4.x/client-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..a089bf0b99 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/list-sessions.md @@ -0,0 +1,32 @@ +query { + accountListSessions { + total + sessions { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-email.md b/docs/examples/1.4.x/client-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..1c11d65eae --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-email.md @@ -0,0 +1,23 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..17c128b93e --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,32 @@ +mutation { + accountUpdateMagicURLSession( + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-name.md b/docs/examples/1.4.x/client-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..0bfa34f84f --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-name.md @@ -0,0 +1,22 @@ +mutation { + accountUpdateName( + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-password.md b/docs/examples/1.4.x/client-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..35e1db66ec --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-password.md @@ -0,0 +1,22 @@ +mutation { + accountUpdatePassword( + password: "" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-phone-session.md b/docs/examples/1.4.x/client-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..a24a6094b4 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-phone-session.md @@ -0,0 +1,32 @@ +mutation { + accountUpdatePhoneSession( + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-phone-verification.md b/docs/examples/1.4.x/client-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..103c2faf18 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +mutation { + accountUpdatePhoneVerification( + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-phone.md b/docs/examples/1.4.x/client-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..e1870ed451 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-phone.md @@ -0,0 +1,23 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-prefs.md b/docs/examples/1.4.x/client-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..11e500c343 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-prefs.md @@ -0,0 +1,22 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-recovery.md b/docs/examples/1.4.x/client-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..a0c985d7db --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-session.md b/docs/examples/1.4.x/client-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..0358f49588 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-session.md @@ -0,0 +1,31 @@ +mutation { + accountUpdateSession( + sessionId: "[SESSION_ID]" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-status.md b/docs/examples/1.4.x/client-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..6f68c7d054 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-status.md @@ -0,0 +1,20 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/account/update-verification.md b/docs/examples/1.4.x/client-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..47abb20d34 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/account/update-verification.md @@ -0,0 +1,12 @@ +mutation { + accountUpdateVerification( + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-browser.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..a76df8a6a2 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +query { + avatarsGetBrowser( + code: "aa" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..84a56c1eaa --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +query { + avatarsGetCreditCard( + code: "amex" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-favicon.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..bfea71f498 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +query { + avatarsGetFavicon( + url: "https://example.com" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-flag.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6f3b6b5421 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +query { + avatarsGetFlag( + code: "af" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-image.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..3371036d31 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +query { + avatarsGetImage( + url: "https://example.com" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-initials.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a1d8bef89c --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +query { + avatarsGetInitials { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/avatars/get-q-r.md b/docs/examples/1.4.x/client-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d2cc1f7f2c --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/avatars/get-q-r.md @@ -0,0 +1,7 @@ +query { + avatarsGetQR( + text: "[TEXT]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/databases/create-document.md b/docs/examples/1.4.x/client-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..6ef546c0de --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/databases/create-document.md @@ -0,0 +1,16 @@ +mutation { + databasesCreateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: "{}" + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/databases/delete-document.md b/docs/examples/1.4.x/client-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..74954bb61b --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/databases/get-document.md b/docs/examples/1.4.x/client-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..94b30290a2 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/databases/get-document.md @@ -0,0 +1,15 @@ +query { + databasesGetDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/databases/list-documents.md b/docs/examples/1.4.x/client-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..62d799ad91 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/databases/list-documents.md @@ -0,0 +1,17 @@ +query { + databasesListDocuments( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" + ) { + total + documents { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/databases/update-document.md b/docs/examples/1.4.x/client-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..0476c4ce40 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/databases/update-document.md @@ -0,0 +1,15 @@ +mutation { + databasesUpdateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.4.x/client-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..56e58db014 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/functions/create-execution.md @@ -0,0 +1,28 @@ +mutation { + functionsCreateExecution( + functionId: "[FUNCTION_ID]" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/functions/get-execution.md b/docs/examples/1.4.x/client-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..bf19fca107 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/functions/get-execution.md @@ -0,0 +1,29 @@ +query { + functionsGetExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/functions/list-executions.md b/docs/examples/1.4.x/client-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..86b656d428 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/functions/list-executions.md @@ -0,0 +1,31 @@ +query { + functionsListExecutions( + functionId: "[FUNCTION_ID]" + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/get.md b/docs/examples/1.4.x/client-graphql/examples/locale/get.md new file mode 100644 index 0000000000..2b2bbcc1f1 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/get.md @@ -0,0 +1,11 @@ +query { + localeGet { + ip + countryCode + country + continentCode + continent + eu + currency + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-codes.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..0164cc3782 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +query { + localeListCodes { + total + localeCodes { + code + name + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-continents.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..41f672c565 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +query { + localeListContinents { + total + continents { + name + code + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..00cd4652f9 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +query { + localeListCountriesEU { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..33d2296850 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +query { + localeListCountriesPhones { + total + phones { + code + countryCode + countryName + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-countries.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..9312bc94b1 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +query { + localeListCountries { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-currencies.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..cde3ab488a --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-currencies.md @@ -0,0 +1,14 @@ +query { + localeListCurrencies { + total + currencies { + symbol + name + symbolNative + decimalDigits + rounding + code + namePlural + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/locale/list-languages.md b/docs/examples/1.4.x/client-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..b0d76c522b --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +query { + localeListLanguages { + total + languages { + name + code + nativeName + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.4.x/client-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..31d50ffbc2 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/create-file.md @@ -0,0 +1,24 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: HOSTNAME +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file) { id }" }, "variables": { "bucketId": "[BUCKET_ID]", "fileId": "[FILE_ID]", "file": null } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"] } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/delete-file.md b/docs/examples/1.4.x/client-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..7ec3757a8c --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/get-file-download.md b/docs/examples/1.4.x/client-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..845547f09b --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/get-file-download.md @@ -0,0 +1,8 @@ +query { + storageGetFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/get-file-preview.md b/docs/examples/1.4.x/client-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c26e90dac2 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/get-file-preview.md @@ -0,0 +1,8 @@ +query { + storageGetFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/get-file-view.md b/docs/examples/1.4.x/client-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..72e9ec20d2 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/get-file-view.md @@ -0,0 +1,8 @@ +query { + storageGetFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/get-file.md b/docs/examples/1.4.x/client-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..61182e1f02 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/get-file.md @@ -0,0 +1,18 @@ +query { + storageGetFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/list-files.md b/docs/examples/1.4.x/client-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..430fc1dbdf --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/list-files.md @@ -0,0 +1,20 @@ +query { + storageListFiles( + bucketId: "[BUCKET_ID]" + ) { + total + files { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/storage/update-file.md b/docs/examples/1.4.x/client-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..0a4c98d087 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/storage/update-file.md @@ -0,0 +1,18 @@ +mutation { + storageUpdateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/create-membership.md b/docs/examples/1.4.x/client-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..045a0ae7a8 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +mutation { + teamsCreateMembership( + teamId: "[TEAM_ID]", + roles: [], + url: "https://example.com" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/create.md b/docs/examples/1.4.x/client-graphql/examples/teams/create.md new file mode 100644 index 0000000000..2dd3ca74fb --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/create.md @@ -0,0 +1,15 @@ +mutation { + teamsCreate( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/delete-membership.md b/docs/examples/1.4.x/client-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..b8a5252fcf --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/delete.md b/docs/examples/1.4.x/client-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..161f8a3454 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "[TEAM_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/get-membership.md b/docs/examples/1.4.x/client-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..d28ef798fa --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/get-membership.md @@ -0,0 +1,19 @@ +query { + teamsGetMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/get-prefs.md b/docs/examples/1.4.x/client-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ce6b851e9e --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +query { + teamsGetPrefs( + teamId: "[TEAM_ID]" + ) { + data + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/get.md b/docs/examples/1.4.x/client-graphql/examples/teams/get.md new file mode 100644 index 0000000000..aa83e30e73 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/get.md @@ -0,0 +1,14 @@ +query { + teamsGet( + teamId: "[TEAM_ID]" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/list-memberships.md b/docs/examples/1.4.x/client-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..8ac82c1faf --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/list-memberships.md @@ -0,0 +1,21 @@ +query { + teamsListMemberships( + teamId: "[TEAM_ID]" + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/list.md b/docs/examples/1.4.x/client-graphql/examples/teams/list.md new file mode 100644 index 0000000000..47117c5627 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/list.md @@ -0,0 +1,15 @@ +query { + teamsList { + total + teams { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/update-membership-status.md b/docs/examples/1.4.x/client-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..ca6cec12e1 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/update-membership.md b/docs/examples/1.4.x/client-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..e56e0c46af --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/update-membership.md @@ -0,0 +1,20 @@ +mutation { + teamsUpdateMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/update-name.md b/docs/examples/1.4.x/client-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..88e994b63a --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.4.x/client-graphql/examples/teams/update-prefs.md b/docs/examples/1.4.x/client-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..55ed909fe3 --- /dev/null +++ b/docs/examples/1.4.x/client-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "[TEAM_ID]", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/client-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..33a349b754 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-email-session.md b/docs/examples/1.4.x/client-rest/examples/account/create-email-session.md new file mode 100644 index 0000000000..09661b0a28 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-email-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.4.x/client-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..382883d879 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwt HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-rest/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..99042b7110 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,11 @@ +POST /v1/account/sessions/magic-url HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.4.x/client-rest/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..c890dbb194 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-o-auth2session.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-phone-session.md b/docs/examples/1.4.x/client-rest/examples/account/create-phone-session.md new file mode 100644 index 0000000000..baf6f39e20 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-phone-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + +{ + "userId": "[USER_ID]", + "phone": "+12065550100" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.4.x/client-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..43512be67f --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-phone-verification.md @@ -0,0 +1,7 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.4.x/client-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..2ef165d2d4 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-recovery.md @@ -0,0 +1,11 @@ +POST /v1/account/recovery HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/create-verification.md b/docs/examples/1.4.x/client-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..81e74312d9 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create-verification.md @@ -0,0 +1,10 @@ +POST /v1/account/verification HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/create.md b/docs/examples/1.4.x/client-rest/examples/account/create.md new file mode 100644 index 0000000000..92d7be7edd --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": , + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.4.x/client-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..25db38436b --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/delete-session.md b/docs/examples/1.4.x/client-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..4783c1983c --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/delete-session.md @@ -0,0 +1,7 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.4.x/client-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..8632a92a29 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/delete-sessions.md @@ -0,0 +1,7 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.4.x/client-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..1de7705065 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/get-prefs.md @@ -0,0 +1,7 @@ +GET /v1/account/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/get-session.md b/docs/examples/1.4.x/client-rest/examples/account/get-session.md new file mode 100644 index 0000000000..2953bc7d5b --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/get-session.md @@ -0,0 +1,7 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/get.md b/docs/examples/1.4.x/client-rest/examples/account/get.md new file mode 100644 index 0000000000..2cf6ee6937 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/get.md @@ -0,0 +1,7 @@ +GET /v1/account HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/list-identities.md b/docs/examples/1.4.x/client-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..f1fc54d32d --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/list-identities.md @@ -0,0 +1,7 @@ +GET /v1/account/identities HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/list-logs.md b/docs/examples/1.4.x/client-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..811310b9a6 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/list-logs.md @@ -0,0 +1,7 @@ +GET /v1/account/logs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.4.x/client-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..25d7a6247b --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/list-sessions.md @@ -0,0 +1,7 @@ +GET /v1/account/sessions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-email.md b/docs/examples/1.4.x/client-rest/examples/account/update-email.md new file mode 100644 index 0000000000..a9bec63172 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-email.md @@ -0,0 +1,11 @@ +PATCH /v1/account/email HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c5b9488d24 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-name.md b/docs/examples/1.4.x/client-rest/examples/account/update-name.md new file mode 100644 index 0000000000..374f2c8642 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-name.md @@ -0,0 +1,10 @@ +PATCH /v1/account/name HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-password.md b/docs/examples/1.4.x/client-rest/examples/account/update-password.md new file mode 100644 index 0000000000..a15a7d3cde --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-password.md @@ -0,0 +1,11 @@ +PATCH /v1/account/password HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.4.x/client-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..ae3ec67f97 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.4.x/client-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a87f9cc404 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-phone-verification.md @@ -0,0 +1,11 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-phone.md b/docs/examples/1.4.x/client-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..90faa9b9f5 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-phone.md @@ -0,0 +1,11 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.4.x/client-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..83f544e705 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-prefs.md @@ -0,0 +1,10 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "prefs": {} +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.4.x/client-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..24cb547aa3 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]", + "password": "password", + "passwordAgain": "password" +} diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-session.md b/docs/examples/1.4.x/client-rest/examples/account/update-session.md new file mode 100644 index 0000000000..880e5ba7e4 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-session.md @@ -0,0 +1,7 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-status.md b/docs/examples/1.4.x/client-rest/examples/account/update-status.md new file mode 100644 index 0000000000..5677d65736 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-status.md @@ -0,0 +1,7 @@ +PATCH /v1/account/status HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/account/update-verification.md b/docs/examples/1.4.x/client-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..ed689bf02e --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/account/update-verification.md @@ -0,0 +1,11 @@ +PUT /v1/account/verification HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..b3d67e7a56 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..a9c4ddbb55 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..b161830c6a --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e17e60f295 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..8cf57cd369 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +GET /v1/avatars/image HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..06e8ce7854 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-initials.md @@ -0,0 +1,7 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.4.x/client-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..4e80c30143 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/avatars/get-q-r.md @@ -0,0 +1,7 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/databases/create-document.md b/docs/examples/1.4.x/client-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..244360c038 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/databases/create-document.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "documentId": "[DOCUMENT_ID]", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.4.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.4.x/client-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..31e759d529 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/databases/delete-document.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/databases/get-document.md b/docs/examples/1.4.x/client-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..dcf91a0726 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/databases/get-document.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.4.x/client-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..ff2f114591 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/databases/list-documents.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/databases/update-document.md b/docs/examples/1.4.x/client-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..0f3323e276 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/databases/update-document.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.4.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.4.x/client-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..26a61019cc --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "body": "[BODY]", + "async": false, + "path": "[PATH]", + "method": "GET", + "headers": {} +} diff --git a/docs/examples/1.4.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.4.x/client-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..13e1892d04 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/functions/get-execution.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.4.x/client-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..734c05f134 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/functions/list-executions.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.4.x/client-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..72be41e976 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/graphql/mutation.md @@ -0,0 +1,11 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: HOSTNAME +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "query": {} +} diff --git a/docs/examples/1.4.x/client-rest/examples/graphql/query.md b/docs/examples/1.4.x/client-rest/examples/graphql/query.md new file mode 100644 index 0000000000..7f3bbc0538 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/graphql/query.md @@ -0,0 +1,11 @@ +POST /v1/graphql HTTP/1.1 +Host: HOSTNAME +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "query": {} +} diff --git a/docs/examples/1.4.x/client-rest/examples/locale/get.md b/docs/examples/1.4.x/client-rest/examples/locale/get.md new file mode 100644 index 0000000000..19cf0f494e --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/get.md @@ -0,0 +1,7 @@ +GET /v1/locale HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.4.x/client-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..bd979ab3ad --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-codes.md @@ -0,0 +1,7 @@ +GET /v1/locale/codes HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.4.x/client-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..177852e4f5 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-continents.md @@ -0,0 +1,7 @@ +GET /v1/locale/continents HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..0fc99eaa59 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/client-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e8767b50c7 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.4.x/client-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..057ca4754c --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-countries.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.4.x/client-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..2cde64208e --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-currencies.md @@ -0,0 +1,7 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.4.x/client-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..0046f8f611 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/locale/list-languages.md @@ -0,0 +1,7 @@ +GET /v1/locale/languages HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/create-file.md b/docs/examples/1.4.x/client-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..1fa06157c6 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/create-file.md @@ -0,0 +1,25 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: HOSTNAME +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"[FILE_ID]" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.4.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.4.x/client-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..37d68d34e2 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/delete-file.md @@ -0,0 +1,7 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.4.x/client-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..d66d170ab7 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/get-file-download.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.4.x/client-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..b6437f6a09 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/get-file-preview.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.4.x/client-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..c64ec5ec3c --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/get-file-view.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/get-file.md b/docs/examples/1.4.x/client-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..8c9673bd74 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/get-file.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/list-files.md b/docs/examples/1.4.x/client-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..01b2d82eb3 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/list-files.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/storage/update-file.md b/docs/examples/1.4.x/client-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..36375259cb --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/storage/update-file.md @@ -0,0 +1,11 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "name": "[NAME]", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.4.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.4.x/client-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..41909070a7 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/create-membership.md @@ -0,0 +1,15 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "email": "email@example.com", + "userId": "[USER_ID]", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/teams/create.md b/docs/examples/1.4.x/client-rest/examples/teams/create.md new file mode 100644 index 0000000000..87a82e2f28 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/create.md @@ -0,0 +1,12 @@ +POST /v1/teams HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "teamId": "[TEAM_ID]", + "name": "[NAME]", + "roles": [] +} diff --git a/docs/examples/1.4.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.4.x/client-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..df46cd06a1 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/delete-membership.md @@ -0,0 +1,7 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/delete.md b/docs/examples/1.4.x/client-rest/examples/teams/delete.md new file mode 100644 index 0000000000..31a9af862e --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.4.x/client-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..27125f773a --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/get-membership.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.4.x/client-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..bfa1c9c871 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/get.md b/docs/examples/1.4.x/client-rest/examples/teams/get.md new file mode 100644 index 0000000000..d6cd3de772 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/get.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.4.x/client-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..b9aeaad2d2 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/list-memberships.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/list.md b/docs/examples/1.4.x/client-rest/examples/teams/list.md new file mode 100644 index 0000000000..00c82bc180 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/list.md @@ -0,0 +1,7 @@ +GET /v1/teams HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.4.x/client-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..5b3a0e7414 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/update-membership-status.md @@ -0,0 +1,11 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.4.x/client-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..94fb6d0ed0 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/update-membership.md @@ -0,0 +1,10 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "roles": [] +} diff --git a/docs/examples/1.4.x/client-rest/examples/teams/update-name.md b/docs/examples/1.4.x/client-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..4eaa1a3232 --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/update-name.md @@ -0,0 +1,10 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.4.x/client-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..d04ee5aa7b --- /dev/null +++ b/docs/examples/1.4.x/client-rest/examples/teams/update-prefs.md @@ -0,0 +1,10 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "prefs": {} +} diff --git a/docs/examples/1.4.x/client-web/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/client-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..c331fc8863 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createAnonymousSession(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-email-session.md b/docs/examples/1.4.x/client-web/examples/account/create-email-session.md new file mode 100644 index 0000000000..76e2e31665 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-email-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createEmailSession('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-j-w-t.md b/docs/examples/1.4.x/client-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..f388a3da31 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createJWT(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/client-web/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..d48f031ded --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createMagicURLSession('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/1.4.x/client-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..3757a1c63f --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-o-auth2session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +// Go to OAuth provider login page +account.createOAuth2Session('amazon'); + diff --git a/docs/examples/1.4.x/client-web/examples/account/create-phone-session.md b/docs/examples/1.4.x/client-web/examples/account/create-phone-session.md new file mode 100644 index 0000000000..e5a23aafee --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-phone-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createPhoneSession('[USER_ID]', '+12065550100'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-phone-verification.md b/docs/examples/1.4.x/client-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a1cbd55277 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-phone-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createPhoneVerification(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-recovery.md b/docs/examples/1.4.x/client-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..1838c0414c --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-recovery.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create-verification.md b/docs/examples/1.4.x/client-web/examples/account/create-verification.md new file mode 100644 index 0000000000..4d8446e6ef --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/create.md b/docs/examples/1.4.x/client-web/examples/account/create.md new file mode 100644 index 0000000000..fda1d88e0f --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/create.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.create('[USER_ID]', 'email@example.com', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/delete-identity.md b/docs/examples/1.4.x/client-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..b4230cef33 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/delete-identity.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/delete-session.md b/docs/examples/1.4.x/client-web/examples/account/delete-session.md new file mode 100644 index 0000000000..c342afb2c9 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/delete-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/delete-sessions.md b/docs/examples/1.4.x/client-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..82133e3845 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/delete-sessions.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.deleteSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/get-prefs.md b/docs/examples/1.4.x/client-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..b98776fd9d --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/get-prefs.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.getPrefs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/get-session.md b/docs/examples/1.4.x/client-web/examples/account/get-session.md new file mode 100644 index 0000000000..43edd7d08a --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/get-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/get.md b/docs/examples/1.4.x/client-web/examples/account/get.md new file mode 100644 index 0000000000..878227f019 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/get.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/list-identities.md b/docs/examples/1.4.x/client-web/examples/account/list-identities.md new file mode 100644 index 0000000000..91e01e221f --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/list-identities.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.listIdentities(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/list-logs.md b/docs/examples/1.4.x/client-web/examples/account/list-logs.md new file mode 100644 index 0000000000..d710f7daa3 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/list-logs.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.listLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/list-sessions.md b/docs/examples/1.4.x/client-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..ce6ec74862 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/list-sessions.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.listSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-email.md b/docs/examples/1.4.x/client-web/examples/account/update-email.md new file mode 100644 index 0000000000..baac3a0ab0 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-email.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/client-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c07fee2b14 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-name.md b/docs/examples/1.4.x/client-web/examples/account/update-name.md new file mode 100644 index 0000000000..4af963d5fc --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-name.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-password.md b/docs/examples/1.4.x/client-web/examples/account/update-password.md new file mode 100644 index 0000000000..2404a743e7 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-password.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePassword(''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-phone-session.md b/docs/examples/1.4.x/client-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..b3b29481a9 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-phone-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePhoneSession('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-phone-verification.md b/docs/examples/1.4.x/client-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a274c9b07c --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-phone-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-phone.md b/docs/examples/1.4.x/client-web/examples/account/update-phone.md new file mode 100644 index 0000000000..a1017fc7f4 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-phone.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePhone('+12065550100', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-prefs.md b/docs/examples/1.4.x/client-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..ecceff3158 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-prefs.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-recovery.md b/docs/examples/1.4.x/client-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..eb78a8a52d --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-recovery.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-session.md b/docs/examples/1.4.x/client-web/examples/account/update-session.md new file mode 100644 index 0000000000..a7a42c663a --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-status.md b/docs/examples/1.4.x/client-web/examples/account/update-status.md new file mode 100644 index 0000000000..9cbe78c5c4 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-status.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateStatus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/account/update-verification.md b/docs/examples/1.4.x/client-web/examples/account/update-verification.md new file mode 100644 index 0000000000..73338da4df --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/account/update-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "appwrite"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-browser.md b/docs/examples/1.4.x/client-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..0b4c2def00 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getBrowser('aa'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/client-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..082ed92b67 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getCreditCard('amex'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-favicon.md b/docs/examples/1.4.x/client-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..7ee6bd3da2 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getFavicon('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-flag.md b/docs/examples/1.4.x/client-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..a43827a1ae --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getFlag('af'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-image.md b/docs/examples/1.4.x/client-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..ea186a1a68 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getImage('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-initials.md b/docs/examples/1.4.x/client-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..7e8c8ec413 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getInitials(); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/avatars/get-q-r.md b/docs/examples/1.4.x/client-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..b957084aa1 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getQR('[TEXT]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/databases/create-document.md b/docs/examples/1.4.x/client-web/examples/databases/create-document.md new file mode 100644 index 0000000000..92792066ef --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/databases/create-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/databases/delete-document.md b/docs/examples/1.4.x/client-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..9e281e7166 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/databases/delete-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.deleteDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/databases/get-document.md b/docs/examples/1.4.x/client-web/examples/databases/get-document.md new file mode 100644 index 0000000000..ea80328794 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/databases/get-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/databases/list-documents.md b/docs/examples/1.4.x/client-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..4a94c99db3 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/databases/list-documents.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listDocuments('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/databases/update-document.md b/docs/examples/1.4.x/client-web/examples/databases/update-document.md new file mode 100644 index 0000000000..cc5ef1cc02 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/databases/update-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/functions/create-execution.md b/docs/examples/1.4.x/client-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..4fc7ac7545 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/functions/get-execution.md b/docs/examples/1.4.x/client-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..2473572c05 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/functions/get-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/functions/list-executions.md b/docs/examples/1.4.x/client-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..481986ef40 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/functions/list-executions.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/graphql/mutation.md b/docs/examples/1.4.x/client-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..1a0b61cd3b --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/graphql/mutation.md @@ -0,0 +1,18 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client(); + +const graphql = new Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = graphql.mutation({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/graphql/query.md b/docs/examples/1.4.x/client-web/examples/graphql/query.md new file mode 100644 index 0000000000..e507fbb5aa --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/graphql/query.md @@ -0,0 +1,18 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client(); + +const graphql = new Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = graphql.query({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/get.md b/docs/examples/1.4.x/client-web/examples/locale/get.md new file mode 100644 index 0000000000..e15bad2ce1 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/get.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-codes.md b/docs/examples/1.4.x/client-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..a18baa0025 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-codes.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCodes(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-continents.md b/docs/examples/1.4.x/client-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..aa3716ef56 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-continents.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listContinents(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/client-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..c924b8df4b --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCountriesEU(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/client-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..0ab60767da --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-countries-phones.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCountriesPhones(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-countries.md b/docs/examples/1.4.x/client-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..ee8c454993 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-countries.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCountries(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-currencies.md b/docs/examples/1.4.x/client-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..dd37b14e25 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-currencies.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCurrencies(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/locale/list-languages.md b/docs/examples/1.4.x/client-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..89ae06d529 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/locale/list-languages.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listLanguages(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/create-file.md b/docs/examples/1.4.x/client-web/examples/storage/create-file.md new file mode 100644 index 0000000000..0cddb08690 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/create-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/delete-file.md b/docs/examples/1.4.x/client-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..257d855c32 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/delete-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/get-file-download.md b/docs/examples/1.4.x/client-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..d8a3542aab --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/get-file-preview.md b/docs/examples/1.4.x/client-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..f0588ba7dc --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/get-file-view.md b/docs/examples/1.4.x/client-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..5eb2855bef --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/get-file.md b/docs/examples/1.4.x/client-web/examples/storage/get-file.md new file mode 100644 index 0000000000..6b39ee386e --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/get-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/list-files.md b/docs/examples/1.4.x/client-web/examples/storage/list-files.md new file mode 100644 index 0000000000..696d4013cd --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/list-files.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/storage/update-file.md b/docs/examples/1.4.x/client-web/examples/storage/update-file.md new file mode 100644 index 0000000000..d22a2f6a11 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/storage/update-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/create-membership.md b/docs/examples/1.4.x/client-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..fded560d78 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/create.md b/docs/examples/1.4.x/client-web/examples/teams/create.md new file mode 100644 index 0000000000..c9037e9575 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/create.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/delete-membership.md b/docs/examples/1.4.x/client-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..c42d669457 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/delete-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/delete.md b/docs/examples/1.4.x/client-web/examples/teams/delete.md new file mode 100644 index 0000000000..0c99b7aab8 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/delete.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/get-membership.md b/docs/examples/1.4.x/client-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..d4d3c5a65d --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/get-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/get-prefs.md b/docs/examples/1.4.x/client-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..bcf3f43806 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/get-prefs.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.getPrefs('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/get.md b/docs/examples/1.4.x/client-web/examples/teams/get.md new file mode 100644 index 0000000000..396916ed41 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/get.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/list-memberships.md b/docs/examples/1.4.x/client-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..dfa0163037 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/list-memberships.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.listMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/list.md b/docs/examples/1.4.x/client-web/examples/teams/list.md new file mode 100644 index 0000000000..daf799b95a --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/list.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/update-membership-status.md b/docs/examples/1.4.x/client-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..de1b7f8402 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/update-membership.md b/docs/examples/1.4.x/client-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..662cb91781 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/update-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updateMembership('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/update-name.md b/docs/examples/1.4.x/client-web/examples/teams/update-name.md new file mode 100644 index 0000000000..3159d51c6c --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/update-name.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updateName('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/client-web/examples/teams/update-prefs.md b/docs/examples/1.4.x/client-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..36f60b18e7 --- /dev/null +++ b/docs/examples/1.4.x/client-web/examples/teams/update-prefs.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updatePrefs('[TEAM_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..a7eb9c5be3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1 @@ +appwrite account createAnonymousSession diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-email-session.md b/docs/examples/1.4.x/console-cli/examples/account/create-email-session.md new file mode 100644 index 0000000000..ec9268c77c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-email-session.md @@ -0,0 +1,3 @@ +appwrite account createEmailSession \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-j-w-t.md b/docs/examples/1.4.x/console-cli/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..7b5337993d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-j-w-t.md @@ -0,0 +1 @@ +appwrite account createJWT diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/console-cli/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..0060f2a892 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,4 @@ +appwrite account createMagicURLSession \ + --userId [USER_ID] \ + --email email@example.com \ + diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-o-auth2session.md b/docs/examples/1.4.x/console-cli/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..9159b8f25f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-o-auth2session.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Session \ + --provider amazon \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-phone-session.md b/docs/examples/1.4.x/console-cli/examples/account/create-phone-session.md new file mode 100644 index 0000000000..8a9e44f438 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-phone-session.md @@ -0,0 +1,3 @@ +appwrite account createPhoneSession \ + --userId [USER_ID] \ + --phone +12065550100 diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-phone-verification.md b/docs/examples/1.4.x/console-cli/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..3c4402ba1f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-phone-verification.md @@ -0,0 +1 @@ +appwrite account createPhoneVerification diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-recovery.md b/docs/examples/1.4.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 0000000000..ea8c145abb --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,3 @@ +appwrite account createRecovery \ + --email email@example.com \ + --url https://example.com diff --git a/docs/examples/1.4.x/console-cli/examples/account/create-verification.md b/docs/examples/1.4.x/console-cli/examples/account/create-verification.md new file mode 100644 index 0000000000..402038b4b6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,2 @@ +appwrite account createVerification \ + --url https://example.com diff --git a/docs/examples/1.4.x/console-cli/examples/account/create.md b/docs/examples/1.4.x/console-cli/examples/account/create.md new file mode 100644 index 0000000000..8b36dd3771 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/create.md @@ -0,0 +1,5 @@ +appwrite account create \ + --userId [USER_ID] \ + --email email@example.com \ + --password '' \ + diff --git a/docs/examples/1.4.x/console-cli/examples/account/delete-identity.md b/docs/examples/1.4.x/console-cli/examples/account/delete-identity.md new file mode 100644 index 0000000000..2f54abfd10 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/delete-identity.md @@ -0,0 +1,2 @@ +appwrite account deleteIdentity \ + --identityId [IDENTITY_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/account/delete-session.md b/docs/examples/1.4.x/console-cli/examples/account/delete-session.md new file mode 100644 index 0000000000..2c68c1a43b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,2 @@ +appwrite account deleteSession \ + --sessionId [SESSION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/account/delete-sessions.md b/docs/examples/1.4.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 0000000000..dd11877a5d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1 @@ +appwrite account deleteSessions diff --git a/docs/examples/1.4.x/console-cli/examples/account/get-prefs.md b/docs/examples/1.4.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 0000000000..6569925d99 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1 @@ +appwrite account getPrefs diff --git a/docs/examples/1.4.x/console-cli/examples/account/get-session.md b/docs/examples/1.4.x/console-cli/examples/account/get-session.md new file mode 100644 index 0000000000..fac3fca10d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/get-session.md @@ -0,0 +1,2 @@ +appwrite account getSession \ + --sessionId [SESSION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/account/get.md b/docs/examples/1.4.x/console-cli/examples/account/get.md new file mode 100644 index 0000000000..c8b46e34c7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/get.md @@ -0,0 +1 @@ +appwrite account get diff --git a/docs/examples/1.4.x/console-cli/examples/account/list-identities.md b/docs/examples/1.4.x/console-cli/examples/account/list-identities.md new file mode 100644 index 0000000000..877b443ea8 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/list-identities.md @@ -0,0 +1,2 @@ +appwrite account listIdentities \ + diff --git a/docs/examples/1.4.x/console-cli/examples/account/list-logs.md b/docs/examples/1.4.x/console-cli/examples/account/list-logs.md new file mode 100644 index 0000000000..e92f49063a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/list-logs.md @@ -0,0 +1,2 @@ +appwrite account listLogs \ + diff --git a/docs/examples/1.4.x/console-cli/examples/account/list-sessions.md b/docs/examples/1.4.x/console-cli/examples/account/list-sessions.md new file mode 100644 index 0000000000..87cbab0f66 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/list-sessions.md @@ -0,0 +1 @@ +appwrite account listSessions diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-email.md b/docs/examples/1.4.x/console-cli/examples/account/update-email.md new file mode 100644 index 0000000000..81938ff3a9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-email.md @@ -0,0 +1,3 @@ +appwrite account updateEmail \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/console-cli/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..1411370123 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,3 @@ +appwrite account updateMagicURLSession \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-name.md b/docs/examples/1.4.x/console-cli/examples/account/update-name.md new file mode 100644 index 0000000000..f4acb58db6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-name.md @@ -0,0 +1,2 @@ +appwrite account updateName \ + --name [NAME] diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-password.md b/docs/examples/1.4.x/console-cli/examples/account/update-password.md new file mode 100644 index 0000000000..340baec562 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-password.md @@ -0,0 +1,3 @@ +appwrite account updatePassword \ + --password '' \ + diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-phone-session.md b/docs/examples/1.4.x/console-cli/examples/account/update-phone-session.md new file mode 100644 index 0000000000..b2ee53a18c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-phone-session.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneSession \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-phone-verification.md b/docs/examples/1.4.x/console-cli/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..5e0dd45617 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneVerification \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-phone.md b/docs/examples/1.4.x/console-cli/examples/account/update-phone.md new file mode 100644 index 0000000000..93a619a801 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-phone.md @@ -0,0 +1,3 @@ +appwrite account updatePhone \ + --phone +12065550100 \ + --password password diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-prefs.md b/docs/examples/1.4.x/console-cli/examples/account/update-prefs.md new file mode 100644 index 0000000000..568ac66e48 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,2 @@ +appwrite account updatePrefs \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-recovery.md b/docs/examples/1.4.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 0000000000..7825aac8f0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,5 @@ +appwrite account updateRecovery \ + --userId [USER_ID] \ + --secret [SECRET] \ + --password password \ + --passwordAgain password diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-session.md b/docs/examples/1.4.x/console-cli/examples/account/update-session.md new file mode 100644 index 0000000000..56f74565de --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-session.md @@ -0,0 +1,2 @@ +appwrite account updateSession \ + --sessionId [SESSION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-status.md b/docs/examples/1.4.x/console-cli/examples/account/update-status.md new file mode 100644 index 0000000000..8886dbbc6a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-status.md @@ -0,0 +1 @@ +appwrite account updateStatus diff --git a/docs/examples/1.4.x/console-cli/examples/account/update-verification.md b/docs/examples/1.4.x/console-cli/examples/account/update-verification.md new file mode 100644 index 0000000000..ff420b5895 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,3 @@ +appwrite account updateVerification \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/1.4.x/console-cli/examples/assistant/chat.md b/docs/examples/1.4.x/console-cli/examples/assistant/chat.md new file mode 100644 index 0000000000..3ddd759702 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/assistant/chat.md @@ -0,0 +1,2 @@ +appwrite assistant chat \ + --prompt [PROMPT] diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-browser.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-browser.md new file mode 100644 index 0000000000..6b4f0b8007 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-browser.md @@ -0,0 +1,5 @@ +appwrite avatars getBrowser \ + --code aa \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..365568ba19 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-credit-card.md @@ -0,0 +1,5 @@ +appwrite avatars getCreditCard \ + --code amex \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-favicon.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c658f1a483 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-favicon.md @@ -0,0 +1,2 @@ +appwrite avatars getFavicon \ + --url https://example.com diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-flag.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-flag.md new file mode 100644 index 0000000000..9f11fef840 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-flag.md @@ -0,0 +1,5 @@ +appwrite avatars getFlag \ + --code af \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-image.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-image.md new file mode 100644 index 0000000000..7df150610c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-image.md @@ -0,0 +1,4 @@ +appwrite avatars getImage \ + --url https://example.com \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-initials.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-initials.md new file mode 100644 index 0000000000..b0b3da71c9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +appwrite avatars getInitials \ + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/avatars/get-q-r.md b/docs/examples/1.4.x/console-cli/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..855f33920a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/avatars/get-q-r.md @@ -0,0 +1,5 @@ +appwrite avatars getQR \ + --text [TEXT] \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/console/variables.md b/docs/examples/1.4.x/console-cli/examples/console/variables.md new file mode 100644 index 0000000000..1c67cf5ad8 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/console/variables.md @@ -0,0 +1 @@ +appwrite console variables diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..4a5b036b21 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createBooleanAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-collection.md b/docs/examples/1.4.x/console-cli/examples/databases/create-collection.md new file mode 100644 index 0000000000..4e349ebb98 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-collection.md @@ -0,0 +1,7 @@ +appwrite databases createCollection \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --name [NAME] \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..95b3f3b27f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createDatetimeAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-document.md b/docs/examples/1.4.x/console-cli/examples/databases/create-document.md new file mode 100644 index 0000000000..6944ac664a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-document.md @@ -0,0 +1,6 @@ +appwrite databases createDocument \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..d26ca2acbd --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createEmailAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..5bd2fccbfc --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases createEnumAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..b0bb3776de --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createFloatAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-index.md b/docs/examples/1.4.x/console-cli/examples/databases/create-index.md new file mode 100644 index 0000000000..27c8dfecf5 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-index.md @@ -0,0 +1,7 @@ +appwrite databases createIndex \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --type key \ + --attributes one two three \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..76b5aad455 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createIntegerAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..c9281dd316 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createIpAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..2de630e62f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-relationship-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createRelationshipAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --relatedCollectionId [RELATED_COLLECTION_ID] \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..fb90147192 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-string-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createStringAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..d204de0c1d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createUrlAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/create.md b/docs/examples/1.4.x/console-cli/examples/databases/create.md new file mode 100644 index 0000000000..d32a9f431b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/create.md @@ -0,0 +1,4 @@ +appwrite databases create \ + --databaseId [DATABASE_ID] \ + --name [NAME] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/delete-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..3db88fbfba --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/delete-attribute.md @@ -0,0 +1,4 @@ +appwrite databases deleteAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/1.4.x/console-cli/examples/databases/delete-collection.md b/docs/examples/1.4.x/console-cli/examples/databases/delete-collection.md new file mode 100644 index 0000000000..f1941d4bf0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/delete-collection.md @@ -0,0 +1,3 @@ +appwrite databases deleteCollection \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/delete-document.md b/docs/examples/1.4.x/console-cli/examples/databases/delete-document.md new file mode 100644 index 0000000000..9dc46f7dc6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/delete-document.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocument \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/delete-index.md b/docs/examples/1.4.x/console-cli/examples/databases/delete-index.md new file mode 100644 index 0000000000..8e7194febf --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/delete-index.md @@ -0,0 +1,4 @@ +appwrite databases deleteIndex \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/1.4.x/console-cli/examples/databases/delete.md b/docs/examples/1.4.x/console-cli/examples/databases/delete.md new file mode 100644 index 0000000000..851cc8deb2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/delete.md @@ -0,0 +1,2 @@ +appwrite databases delete \ + --databaseId [DATABASE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/get-attribute.md new file mode 100644 index 0000000000..3dbb2c44fe --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-attribute.md @@ -0,0 +1,4 @@ +appwrite databases getAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-collection-usage.md b/docs/examples/1.4.x/console-cli/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..de8f78665a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-collection-usage.md @@ -0,0 +1,4 @@ +appwrite databases getCollectionUsage \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-collection.md b/docs/examples/1.4.x/console-cli/examples/databases/get-collection.md new file mode 100644 index 0000000000..a4f08fbd45 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-collection.md @@ -0,0 +1,3 @@ +appwrite databases getCollection \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-database-usage.md b/docs/examples/1.4.x/console-cli/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..e4d3e4df3a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite databases getDatabaseUsage \ + --databaseId [DATABASE_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-document.md b/docs/examples/1.4.x/console-cli/examples/databases/get-document.md new file mode 100644 index 0000000000..c84aee31de --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-document.md @@ -0,0 +1,5 @@ +appwrite databases getDocument \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-index.md b/docs/examples/1.4.x/console-cli/examples/databases/get-index.md new file mode 100644 index 0000000000..b7537897ac --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-index.md @@ -0,0 +1,4 @@ +appwrite databases getIndex \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get-usage.md b/docs/examples/1.4.x/console-cli/examples/databases/get-usage.md new file mode 100644 index 0000000000..53c85fc849 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get-usage.md @@ -0,0 +1,2 @@ +appwrite databases getUsage \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/get.md b/docs/examples/1.4.x/console-cli/examples/databases/get.md new file mode 100644 index 0000000000..feb9a3c859 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/get.md @@ -0,0 +1,2 @@ +appwrite databases get \ + --databaseId [DATABASE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-attributes.md b/docs/examples/1.4.x/console-cli/examples/databases/list-attributes.md new file mode 100644 index 0000000000..1332e27689 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-attributes.md @@ -0,0 +1,4 @@ +appwrite databases listAttributes \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-collection-logs.md b/docs/examples/1.4.x/console-cli/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..fa2f062797 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-collection-logs.md @@ -0,0 +1,4 @@ +appwrite databases listCollectionLogs \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-collections.md b/docs/examples/1.4.x/console-cli/examples/databases/list-collections.md new file mode 100644 index 0000000000..6517ebbc16 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-collections.md @@ -0,0 +1,4 @@ +appwrite databases listCollections \ + --databaseId [DATABASE_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-document-logs.md b/docs/examples/1.4.x/console-cli/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..0ab0125d0d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-document-logs.md @@ -0,0 +1,5 @@ +appwrite databases listDocumentLogs \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-documents.md b/docs/examples/1.4.x/console-cli/examples/databases/list-documents.md new file mode 100644 index 0000000000..08dcbdf584 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-documents.md @@ -0,0 +1,4 @@ +appwrite databases listDocuments \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-indexes.md b/docs/examples/1.4.x/console-cli/examples/databases/list-indexes.md new file mode 100644 index 0000000000..349b3cba88 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-indexes.md @@ -0,0 +1,4 @@ +appwrite databases listIndexes \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list-logs.md b/docs/examples/1.4.x/console-cli/examples/databases/list-logs.md new file mode 100644 index 0000000000..f1c44f1f74 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list-logs.md @@ -0,0 +1,3 @@ +appwrite databases listLogs \ + --databaseId [DATABASE_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/list.md b/docs/examples/1.4.x/console-cli/examples/databases/list.md new file mode 100644 index 0000000000..e723bc32ec --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/list.md @@ -0,0 +1,3 @@ +appwrite databases list \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..ed4fc54045 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-boolean-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateBooleanAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --default false diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-collection.md b/docs/examples/1.4.x/console-cli/examples/databases/update-collection.md new file mode 100644 index 0000000000..027d7cc830 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-collection.md @@ -0,0 +1,7 @@ +appwrite databases updateCollection \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --name [NAME] \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..9cb22edb6d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-datetime-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateDatetimeAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --default '' diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-document.md b/docs/examples/1.4.x/console-cli/examples/databases/update-document.md new file mode 100644 index 0000000000..d281fe2efe --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-document.md @@ -0,0 +1,6 @@ +appwrite databases updateDocument \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8e148e93c8 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-email-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateEmailAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --default email@example.com diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..c77c3c0685 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-enum-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateEnumAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --elements one two three \ + --required false \ + --default [DEFAULT] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..a28af54a12 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-float-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateFloatAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --min null \ + --max null \ + --default null diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..f534a75087 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-integer-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateIntegerAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --min null \ + --max null \ + --default null diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..0802bd7914 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-ip-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateIpAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --default '' diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..ead7e1e486 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-relationship-attribute.md @@ -0,0 +1,5 @@ +appwrite databases updateRelationshipAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..93a61e1163 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-string-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateStringAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --default [DEFAULT] diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/console-cli/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..dba3779ac3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update-url-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateUrlAttribute \ + --databaseId [DATABASE_ID] \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + --default https://example.com diff --git a/docs/examples/1.4.x/console-cli/examples/databases/update.md b/docs/examples/1.4.x/console-cli/examples/databases/update.md new file mode 100644 index 0000000000..b66d8bc808 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/databases/update.md @@ -0,0 +1,4 @@ +appwrite databases update \ + --databaseId [DATABASE_ID] \ + --name [NAME] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/create-build.md b/docs/examples/1.4.x/console-cli/examples/functions/create-build.md new file mode 100644 index 0000000000..efbf91ceb7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/create-build.md @@ -0,0 +1,4 @@ +appwrite functions createBuild \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] \ + --buildId [BUILD_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/create-deployment.md b/docs/examples/1.4.x/console-cli/examples/functions/create-deployment.md new file mode 100644 index 0000000000..8682bc33ad --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,6 @@ +appwrite functions createDeployment \ + --functionId [FUNCTION_ID] \ + --code 'path/to/file.png' \ + --activate false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/create-execution.md b/docs/examples/1.4.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 0000000000..ef8bff77ef --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,7 @@ +appwrite functions createExecution \ + --functionId [FUNCTION_ID] \ + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/create-variable.md b/docs/examples/1.4.x/console-cli/examples/functions/create-variable.md new file mode 100644 index 0000000000..79b559fa6e --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/create-variable.md @@ -0,0 +1,4 @@ +appwrite functions createVariable \ + --functionId [FUNCTION_ID] \ + --key [KEY] \ + --value [VALUE] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/create.md b/docs/examples/1.4.x/console-cli/examples/functions/create.md new file mode 100644 index 0000000000..fa5c159018 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/create.md @@ -0,0 +1,21 @@ +appwrite functions create \ + --functionId [FUNCTION_ID] \ + --name [NAME] \ + --runtime node-14.5 \ + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/delete-deployment.md b/docs/examples/1.4.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2033b846ce --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite functions deleteDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/delete-variable.md b/docs/examples/1.4.x/console-cli/examples/functions/delete-variable.md new file mode 100644 index 0000000000..cb556644ca --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/delete-variable.md @@ -0,0 +1,3 @@ +appwrite functions deleteVariable \ + --functionId [FUNCTION_ID] \ + --variableId [VARIABLE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/delete.md b/docs/examples/1.4.x/console-cli/examples/functions/delete.md new file mode 100644 index 0000000000..b3ce304016 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/delete.md @@ -0,0 +1,2 @@ +appwrite functions delete \ + --functionId [FUNCTION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/download-deployment.md b/docs/examples/1.4.x/console-cli/examples/functions/download-deployment.md new file mode 100644 index 0000000000..51621c097f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/download-deployment.md @@ -0,0 +1,3 @@ +appwrite functions downloadDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/get-deployment.md b/docs/examples/1.4.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 0000000000..668bcde4fe --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,3 @@ +appwrite functions getDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/get-execution.md b/docs/examples/1.4.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 0000000000..b6a974766d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,3 @@ +appwrite functions getExecution \ + --functionId [FUNCTION_ID] \ + --executionId [EXECUTION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/get-function-usage.md b/docs/examples/1.4.x/console-cli/examples/functions/get-function-usage.md new file mode 100644 index 0000000000..71129c386f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/get-function-usage.md @@ -0,0 +1,3 @@ +appwrite functions getFunctionUsage \ + --functionId [FUNCTION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/get-usage.md b/docs/examples/1.4.x/console-cli/examples/functions/get-usage.md new file mode 100644 index 0000000000..a3fe7c38de --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/get-usage.md @@ -0,0 +1,2 @@ +appwrite functions getUsage \ + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/get-variable.md b/docs/examples/1.4.x/console-cli/examples/functions/get-variable.md new file mode 100644 index 0000000000..8a8bd4832e --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/get-variable.md @@ -0,0 +1,3 @@ +appwrite functions getVariable \ + --functionId [FUNCTION_ID] \ + --variableId [VARIABLE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/get.md b/docs/examples/1.4.x/console-cli/examples/functions/get.md new file mode 100644 index 0000000000..0332c4a6aa --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/get.md @@ -0,0 +1,2 @@ +appwrite functions get \ + --functionId [FUNCTION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/list-deployments.md b/docs/examples/1.4.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 0000000000..5ffd5b909f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,4 @@ +appwrite functions listDeployments \ + --functionId [FUNCTION_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/list-executions.md b/docs/examples/1.4.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 0000000000..894cb04426 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,4 @@ +appwrite functions listExecutions \ + --functionId [FUNCTION_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/list-runtimes.md b/docs/examples/1.4.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..15dc019c44 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1 @@ +appwrite functions listRuntimes diff --git a/docs/examples/1.4.x/console-cli/examples/functions/list-variables.md b/docs/examples/1.4.x/console-cli/examples/functions/list-variables.md new file mode 100644 index 0000000000..3e4df28a86 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/list-variables.md @@ -0,0 +1,2 @@ +appwrite functions listVariables \ + --functionId [FUNCTION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/list.md b/docs/examples/1.4.x/console-cli/examples/functions/list.md new file mode 100644 index 0000000000..3b7551266e --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/list.md @@ -0,0 +1,3 @@ +appwrite functions list \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/update-deployment.md b/docs/examples/1.4.x/console-cli/examples/functions/update-deployment.md new file mode 100644 index 0000000000..7276b3e780 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/update-deployment.md @@ -0,0 +1,3 @@ +appwrite functions updateDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/functions/update-variable.md b/docs/examples/1.4.x/console-cli/examples/functions/update-variable.md new file mode 100644 index 0000000000..56e9ebeb00 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/update-variable.md @@ -0,0 +1,5 @@ +appwrite functions updateVariable \ + --functionId [FUNCTION_ID] \ + --variableId [VARIABLE_ID] \ + --key [KEY] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/functions/update.md b/docs/examples/1.4.x/console-cli/examples/functions/update.md new file mode 100644 index 0000000000..d63f64302a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/functions/update.md @@ -0,0 +1,17 @@ +appwrite functions update \ + --functionId [FUNCTION_ID] \ + --name [NAME] \ + --runtime node-14.5 \ + + + + + + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/graphql/mutation.md b/docs/examples/1.4.x/console-cli/examples/graphql/mutation.md new file mode 100644 index 0000000000..f6127a175c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/graphql/mutation.md @@ -0,0 +1,2 @@ +appwrite graphql mutation \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.4.x/console-cli/examples/graphql/query.md b/docs/examples/1.4.x/console-cli/examples/graphql/query.md new file mode 100644 index 0000000000..1d84bcaa6a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/graphql/query.md @@ -0,0 +1,2 @@ +appwrite graphql query \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-antivirus.md b/docs/examples/1.4.x/console-cli/examples/health/get-antivirus.md new file mode 100644 index 0000000000..96dd7e78b2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-antivirus.md @@ -0,0 +1 @@ +appwrite health getAntivirus diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-cache.md b/docs/examples/1.4.x/console-cli/examples/health/get-cache.md new file mode 100644 index 0000000000..ad1111ccf0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-cache.md @@ -0,0 +1 @@ +appwrite health getCache diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-d-b.md b/docs/examples/1.4.x/console-cli/examples/health/get-d-b.md new file mode 100644 index 0000000000..b0ea2d3eac --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-d-b.md @@ -0,0 +1 @@ +appwrite health getDB diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-pub-sub.md b/docs/examples/1.4.x/console-cli/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..aa1773b35b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-pub-sub.md @@ -0,0 +1 @@ +appwrite health getPubSub diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/console-cli/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7cae239389 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-queue-certificates.md @@ -0,0 +1 @@ +appwrite health getQueueCertificates diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-queue-functions.md b/docs/examples/1.4.x/console-cli/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..9edfddac62 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-queue-functions.md @@ -0,0 +1 @@ +appwrite health getQueueFunctions diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-queue-logs.md b/docs/examples/1.4.x/console-cli/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..9a0974934b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-queue-logs.md @@ -0,0 +1 @@ +appwrite health getQueueLogs diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/console-cli/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..f38eaa4e77 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-queue-webhooks.md @@ -0,0 +1 @@ +appwrite health getQueueWebhooks diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-queue.md b/docs/examples/1.4.x/console-cli/examples/health/get-queue.md new file mode 100644 index 0000000000..24ad16cbaa --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-queue.md @@ -0,0 +1 @@ +appwrite health getQueue diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-storage-local.md b/docs/examples/1.4.x/console-cli/examples/health/get-storage-local.md new file mode 100644 index 0000000000..b5df39fae0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-storage-local.md @@ -0,0 +1 @@ +appwrite health getStorageLocal diff --git a/docs/examples/1.4.x/console-cli/examples/health/get-time.md b/docs/examples/1.4.x/console-cli/examples/health/get-time.md new file mode 100644 index 0000000000..067e5daf9e --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get-time.md @@ -0,0 +1 @@ +appwrite health getTime diff --git a/docs/examples/1.4.x/console-cli/examples/health/get.md b/docs/examples/1.4.x/console-cli/examples/health/get.md new file mode 100644 index 0000000000..94c08e5aa3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/health/get.md @@ -0,0 +1 @@ +appwrite health get diff --git a/docs/examples/1.4.x/console-cli/examples/locale/get.md b/docs/examples/1.4.x/console-cli/examples/locale/get.md new file mode 100644 index 0000000000..2002a06c20 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/get.md @@ -0,0 +1 @@ +appwrite locale get diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-codes.md b/docs/examples/1.4.x/console-cli/examples/locale/list-codes.md new file mode 100644 index 0000000000..5586d1566c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-codes.md @@ -0,0 +1 @@ +appwrite locale listCodes diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-continents.md b/docs/examples/1.4.x/console-cli/examples/locale/list-continents.md new file mode 100644 index 0000000000..775af5d9df --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-continents.md @@ -0,0 +1 @@ +appwrite locale listContinents diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/console-cli/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..43b7eff7ad --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-countries-e-u.md @@ -0,0 +1 @@ +appwrite locale listCountriesEU diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/console-cli/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..072516bf71 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-countries-phones.md @@ -0,0 +1 @@ +appwrite locale listCountriesPhones diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-countries.md b/docs/examples/1.4.x/console-cli/examples/locale/list-countries.md new file mode 100644 index 0000000000..ee7101df68 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-countries.md @@ -0,0 +1 @@ +appwrite locale listCountries diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-currencies.md b/docs/examples/1.4.x/console-cli/examples/locale/list-currencies.md new file mode 100644 index 0000000000..01b1b3c4b2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-currencies.md @@ -0,0 +1 @@ +appwrite locale listCurrencies diff --git a/docs/examples/1.4.x/console-cli/examples/locale/list-languages.md b/docs/examples/1.4.x/console-cli/examples/locale/list-languages.md new file mode 100644 index 0000000000..d47622c570 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/locale/list-languages.md @@ -0,0 +1 @@ +appwrite locale listLanguages diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/create-appwrite-migration.md b/docs/examples/1.4.x/console-cli/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..874abb5eed --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,5 @@ +appwrite migrations createAppwriteMigration \ + --resources one two three \ + --endpoint https://example.com \ + --projectId [PROJECT_ID] \ + --apiKey [API_KEY] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-migration.md b/docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..a87097c054 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-migration.md @@ -0,0 +1,3 @@ +appwrite migrations createFirebaseMigration \ + --resources one two three \ + --serviceAccount [SERVICE_ACCOUNT] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-o-auth-migration.md b/docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-o-auth-migration.md new file mode 100644 index 0000000000..d85e1e0199 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/create-firebase-o-auth-migration.md @@ -0,0 +1,3 @@ +appwrite migrations createFirebaseOAuthMigration \ + --resources one two three \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/create-n-host-migration.md b/docs/examples/1.4.x/console-cli/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..896f5a2801 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/create-n-host-migration.md @@ -0,0 +1,9 @@ +appwrite migrations createNHostMigration \ + --resources one two three \ + --subdomain [SUBDOMAIN] \ + --region [REGION] \ + --adminSecret [ADMIN_SECRET] \ + --database [DATABASE] \ + --username [USERNAME] \ + --password [PASSWORD] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/create-supabase-migration.md b/docs/examples/1.4.x/console-cli/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..49eede05c4 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/create-supabase-migration.md @@ -0,0 +1,8 @@ +appwrite migrations createSupabaseMigration \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey [API_KEY] \ + --databaseHost [DATABASE_HOST] \ + --username [USERNAME] \ + --password [PASSWORD] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/delete-firebase-auth.md b/docs/examples/1.4.x/console-cli/examples/migrations/delete-firebase-auth.md new file mode 100644 index 0000000000..d58abd9878 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/delete-firebase-auth.md @@ -0,0 +1 @@ +appwrite migrations deleteFirebaseAuth diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/delete.md b/docs/examples/1.4.x/console-cli/examples/migrations/delete.md new file mode 100644 index 0000000000..9447d97fed --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/delete.md @@ -0,0 +1,2 @@ +appwrite migrations delete \ + --migrationId [MIGRATION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/get-appwrite-report.md b/docs/examples/1.4.x/console-cli/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..bdc88573a2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/get-appwrite-report.md @@ -0,0 +1,5 @@ +appwrite migrations getAppwriteReport \ + --resources one two three \ + --endpoint https://example.com \ + --projectID [PROJECT_ID] \ + --key [KEY] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report-o-auth.md b/docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report-o-auth.md new file mode 100644 index 0000000000..2faa1d2e87 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report-o-auth.md @@ -0,0 +1,3 @@ +appwrite migrations getFirebaseReportOAuth \ + --resources one two three \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report.md b/docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..c8bfc0b382 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/get-firebase-report.md @@ -0,0 +1,3 @@ +appwrite migrations getFirebaseReport \ + --resources one two three \ + --serviceAccount [SERVICE_ACCOUNT] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/get-n-host-report.md b/docs/examples/1.4.x/console-cli/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..36613b13b2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/get-n-host-report.md @@ -0,0 +1,9 @@ +appwrite migrations getNHostReport \ + --resources one two three \ + --subdomain [SUBDOMAIN] \ + --region [REGION] \ + --adminSecret [ADMIN_SECRET] \ + --database [DATABASE] \ + --username [USERNAME] \ + --password [PASSWORD] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/get-supabase-report.md b/docs/examples/1.4.x/console-cli/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..3ef3874a67 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/get-supabase-report.md @@ -0,0 +1,8 @@ +appwrite migrations getSupabaseReport \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey [API_KEY] \ + --databaseHost [DATABASE_HOST] \ + --username [USERNAME] \ + --password [PASSWORD] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/get.md b/docs/examples/1.4.x/console-cli/examples/migrations/get.md new file mode 100644 index 0000000000..5f823b675d --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/get.md @@ -0,0 +1,2 @@ +appwrite migrations get \ + --migrationId [MIGRATION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/list-firebase-projects.md b/docs/examples/1.4.x/console-cli/examples/migrations/list-firebase-projects.md new file mode 100644 index 0000000000..a0e59713eb --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/list-firebase-projects.md @@ -0,0 +1 @@ +appwrite migrations listFirebaseProjects diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/list.md b/docs/examples/1.4.x/console-cli/examples/migrations/list.md new file mode 100644 index 0000000000..c120a61e80 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/list.md @@ -0,0 +1,3 @@ +appwrite migrations list \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/migrations/retry.md b/docs/examples/1.4.x/console-cli/examples/migrations/retry.md new file mode 100644 index 0000000000..848bf4d0ec --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/migrations/retry.md @@ -0,0 +1,2 @@ +appwrite migrations retry \ + --migrationId [MIGRATION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/project/create-variable.md b/docs/examples/1.4.x/console-cli/examples/project/create-variable.md new file mode 100644 index 0000000000..800c8bdca6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/project/create-variable.md @@ -0,0 +1,3 @@ +appwrite project createVariable \ + --key [KEY] \ + --value [VALUE] diff --git a/docs/examples/1.4.x/console-cli/examples/project/delete-variable.md b/docs/examples/1.4.x/console-cli/examples/project/delete-variable.md new file mode 100644 index 0000000000..e71af4851a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/project/delete-variable.md @@ -0,0 +1,2 @@ +appwrite project deleteVariable \ + --variableId [VARIABLE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/project/get-usage.md b/docs/examples/1.4.x/console-cli/examples/project/get-usage.md new file mode 100644 index 0000000000..e2024f3f6e --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/project/get-usage.md @@ -0,0 +1,2 @@ +appwrite project getUsage \ + diff --git a/docs/examples/1.4.x/console-cli/examples/project/get-variable.md b/docs/examples/1.4.x/console-cli/examples/project/get-variable.md new file mode 100644 index 0000000000..bf4d97f46e --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/project/get-variable.md @@ -0,0 +1,2 @@ +appwrite project getVariable \ + --variableId [VARIABLE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/project/list-variables.md b/docs/examples/1.4.x/console-cli/examples/project/list-variables.md new file mode 100644 index 0000000000..bd26c7db6b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/project/list-variables.md @@ -0,0 +1 @@ +appwrite project listVariables diff --git a/docs/examples/1.4.x/console-cli/examples/project/update-variable.md b/docs/examples/1.4.x/console-cli/examples/project/update-variable.md new file mode 100644 index 0000000000..3196419a32 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/project/update-variable.md @@ -0,0 +1,4 @@ +appwrite project updateVariable \ + --variableId [VARIABLE_ID] \ + --key [KEY] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/create-key.md b/docs/examples/1.4.x/console-cli/examples/projects/create-key.md new file mode 100644 index 0000000000..14112865c5 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/create-key.md @@ -0,0 +1,5 @@ +appwrite projects createKey \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + --scopes one two three \ + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/create-platform.md b/docs/examples/1.4.x/console-cli/examples/projects/create-platform.md new file mode 100644 index 0000000000..1374f510e2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/create-platform.md @@ -0,0 +1,7 @@ +appwrite projects createPlatform \ + --projectId [PROJECT_ID] \ + --type web \ + --name [NAME] \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/create-webhook.md b/docs/examples/1.4.x/console-cli/examples/projects/create-webhook.md new file mode 100644 index 0000000000..2eaacd167f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/create-webhook.md @@ -0,0 +1,8 @@ +appwrite projects createWebhook \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + --events one two three \ + --url https://example.com \ + --security false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/create.md b/docs/examples/1.4.x/console-cli/examples/projects/create.md new file mode 100644 index 0000000000..e851cefb5f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/create.md @@ -0,0 +1,14 @@ +appwrite projects create \ + --projectId '' \ + --name [NAME] \ + --teamId [TEAM_ID] \ + + + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/delete-email-template.md b/docs/examples/1.4.x/console-cli/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..38939595f0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/delete-email-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteEmailTemplate \ + --projectId [PROJECT_ID] \ + --type verification \ + --locale af diff --git a/docs/examples/1.4.x/console-cli/examples/projects/delete-key.md b/docs/examples/1.4.x/console-cli/examples/projects/delete-key.md new file mode 100644 index 0000000000..48f97cf529 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/delete-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteKey \ + --projectId [PROJECT_ID] \ + --keyId [KEY_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/delete-platform.md b/docs/examples/1.4.x/console-cli/examples/projects/delete-platform.md new file mode 100644 index 0000000000..9e14cb5b69 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/delete-platform.md @@ -0,0 +1,3 @@ +appwrite projects deletePlatform \ + --projectId [PROJECT_ID] \ + --platformId [PLATFORM_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/delete-sms-template.md b/docs/examples/1.4.x/console-cli/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..fdb080b6e5 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/delete-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteSmsTemplate \ + --projectId [PROJECT_ID] \ + --type verification \ + --locale af diff --git a/docs/examples/1.4.x/console-cli/examples/projects/delete-webhook.md b/docs/examples/1.4.x/console-cli/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..1235e737c4 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/delete-webhook.md @@ -0,0 +1,3 @@ +appwrite projects deleteWebhook \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/delete.md b/docs/examples/1.4.x/console-cli/examples/projects/delete.md new file mode 100644 index 0000000000..9b0903d301 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/delete.md @@ -0,0 +1,2 @@ +appwrite projects delete \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get-email-template.md b/docs/examples/1.4.x/console-cli/examples/projects/get-email-template.md new file mode 100644 index 0000000000..dcb55ce0a9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get-email-template.md @@ -0,0 +1,4 @@ +appwrite projects getEmailTemplate \ + --projectId [PROJECT_ID] \ + --type verification \ + --locale af diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get-key.md b/docs/examples/1.4.x/console-cli/examples/projects/get-key.md new file mode 100644 index 0000000000..75548d21b3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get-key.md @@ -0,0 +1,3 @@ +appwrite projects getKey \ + --projectId [PROJECT_ID] \ + --keyId [KEY_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get-platform.md b/docs/examples/1.4.x/console-cli/examples/projects/get-platform.md new file mode 100644 index 0000000000..97432f00a2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get-platform.md @@ -0,0 +1,3 @@ +appwrite projects getPlatform \ + --projectId [PROJECT_ID] \ + --platformId [PLATFORM_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get-sms-template.md b/docs/examples/1.4.x/console-cli/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..0144b31e2f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects getSmsTemplate \ + --projectId [PROJECT_ID] \ + --type verification \ + --locale af diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get-usage.md b/docs/examples/1.4.x/console-cli/examples/projects/get-usage.md new file mode 100644 index 0000000000..a10e474c14 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get-usage.md @@ -0,0 +1,3 @@ +appwrite projects getUsage \ + --projectId [PROJECT_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get-webhook.md b/docs/examples/1.4.x/console-cli/examples/projects/get-webhook.md new file mode 100644 index 0000000000..b51a78c247 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get-webhook.md @@ -0,0 +1,3 @@ +appwrite projects getWebhook \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/get.md b/docs/examples/1.4.x/console-cli/examples/projects/get.md new file mode 100644 index 0000000000..b0589ea3e7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/get.md @@ -0,0 +1,2 @@ +appwrite projects get \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/list-keys.md b/docs/examples/1.4.x/console-cli/examples/projects/list-keys.md new file mode 100644 index 0000000000..aba2fab9e1 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/list-keys.md @@ -0,0 +1,2 @@ +appwrite projects listKeys \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/list-platforms.md b/docs/examples/1.4.x/console-cli/examples/projects/list-platforms.md new file mode 100644 index 0000000000..cd7ae3760f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/list-platforms.md @@ -0,0 +1,2 @@ +appwrite projects listPlatforms \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/list-webhooks.md b/docs/examples/1.4.x/console-cli/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..cda3f1e5c8 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/list-webhooks.md @@ -0,0 +1,2 @@ +appwrite projects listWebhooks \ + --projectId [PROJECT_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/list.md b/docs/examples/1.4.x/console-cli/examples/projects/list.md new file mode 100644 index 0000000000..0d3dd7a539 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/list.md @@ -0,0 +1,3 @@ +appwrite projects list \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-auth-duration.md b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..f2e49efc73 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-duration.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthDuration \ + --projectId [PROJECT_ID] \ + --duration 0 diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-auth-limit.md b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..0f59c9600c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthLimit \ + --projectId [PROJECT_ID] \ + --limit 0 diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..e05b7d1722 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordDictionary \ + --projectId [PROJECT_ID] \ + --enabled false diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-history.md b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..9f507127ae --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-password-history.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordHistory \ + --projectId [PROJECT_ID] \ + --limit 0 diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..f22ecf3596 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthSessionsLimit \ + --projectId [PROJECT_ID] \ + --limit 1 diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-auth-status.md b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..c4348c1b09 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-auth-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAuthStatus \ + --projectId [PROJECT_ID] \ + --method email-password \ + --status false diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-email-template.md b/docs/examples/1.4.x/console-cli/examples/projects/update-email-template.md new file mode 100644 index 0000000000..e89ca80c63 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-email-template.md @@ -0,0 +1,9 @@ +appwrite projects updateEmailTemplate \ + --projectId [PROJECT_ID] \ + --type verification \ + --locale af \ + --subject [SUBJECT] \ + --message [MESSAGE] \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-key.md b/docs/examples/1.4.x/console-cli/examples/projects/update-key.md new file mode 100644 index 0000000000..97a004b5a2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-key.md @@ -0,0 +1,6 @@ +appwrite projects updateKey \ + --projectId [PROJECT_ID] \ + --keyId [KEY_ID] \ + --name [NAME] \ + --scopes one two three \ + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-o-auth2.md b/docs/examples/1.4.x/console-cli/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..95c4165192 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-o-auth2.md @@ -0,0 +1,6 @@ +appwrite projects updateOAuth2 \ + --projectId [PROJECT_ID] \ + --provider amazon \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-personal-data-check.md b/docs/examples/1.4.x/console-cli/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..d6cf4ce3ea --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-personal-data-check.md @@ -0,0 +1,3 @@ +appwrite projects updatePersonalDataCheck \ + --projectId [PROJECT_ID] \ + --enabled false diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-platform.md b/docs/examples/1.4.x/console-cli/examples/projects/update-platform.md new file mode 100644 index 0000000000..77268a4ee7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-platform.md @@ -0,0 +1,7 @@ +appwrite projects updatePlatform \ + --projectId [PROJECT_ID] \ + --platformId [PLATFORM_ID] \ + --name [NAME] \ + + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-service-status-all.md b/docs/examples/1.4.x/console-cli/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..bcf29dbdab --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-service-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateServiceStatusAll \ + --projectId [PROJECT_ID] \ + --status false diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-service-status.md b/docs/examples/1.4.x/console-cli/examples/projects/update-service-status.md new file mode 100644 index 0000000000..4cfd9f9f3c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-service-status.md @@ -0,0 +1,4 @@ +appwrite projects updateServiceStatus \ + --projectId [PROJECT_ID] \ + --service account \ + --status false diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-sms-template.md b/docs/examples/1.4.x/console-cli/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..9220501690 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-sms-template.md @@ -0,0 +1,5 @@ +appwrite projects updateSmsTemplate \ + --projectId [PROJECT_ID] \ + --type verification \ + --locale af \ + --message [MESSAGE] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-smtp-configuration.md b/docs/examples/1.4.x/console-cli/examples/projects/update-smtp-configuration.md new file mode 100644 index 0000000000..def346b6f3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-smtp-configuration.md @@ -0,0 +1,11 @@ +appwrite projects updateSmtpConfiguration \ + --projectId [PROJECT_ID] \ + --enabled false \ + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-team.md b/docs/examples/1.4.x/console-cli/examples/projects/update-team.md new file mode 100644 index 0000000000..906e2879e6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-team.md @@ -0,0 +1,3 @@ +appwrite projects updateTeam \ + --projectId [PROJECT_ID] \ + --teamId [TEAM_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-webhook-signature.md b/docs/examples/1.4.x/console-cli/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..1040b491e8 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-webhook-signature.md @@ -0,0 +1,3 @@ +appwrite projects updateWebhookSignature \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update-webhook.md b/docs/examples/1.4.x/console-cli/examples/projects/update-webhook.md new file mode 100644 index 0000000000..98517cbfa8 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update-webhook.md @@ -0,0 +1,9 @@ +appwrite projects updateWebhook \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] \ + --name [NAME] \ + --events one two three \ + --url https://example.com \ + --security false \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/projects/update.md b/docs/examples/1.4.x/console-cli/examples/projects/update.md new file mode 100644 index 0000000000..83e99a1a8a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/projects/update.md @@ -0,0 +1,12 @@ +appwrite projects update \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/proxy/create-rule.md b/docs/examples/1.4.x/console-cli/examples/proxy/create-rule.md new file mode 100644 index 0000000000..3d821040a7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/proxy/create-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createRule \ + --domain '' \ + --resourceType api \ + diff --git a/docs/examples/1.4.x/console-cli/examples/proxy/delete-rule.md b/docs/examples/1.4.x/console-cli/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..7b1c77d5dd --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/proxy/delete-rule.md @@ -0,0 +1,2 @@ +appwrite proxy deleteRule \ + --ruleId [RULE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/proxy/get-rule.md b/docs/examples/1.4.x/console-cli/examples/proxy/get-rule.md new file mode 100644 index 0000000000..2f16d37ed6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/proxy/get-rule.md @@ -0,0 +1,2 @@ +appwrite proxy getRule \ + --ruleId [RULE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/proxy/list-rules.md b/docs/examples/1.4.x/console-cli/examples/proxy/list-rules.md new file mode 100644 index 0000000000..bc654bac5c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/proxy/list-rules.md @@ -0,0 +1,3 @@ +appwrite proxy listRules \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/proxy/update-rule-verification.md b/docs/examples/1.4.x/console-cli/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..6f4e4df826 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/proxy/update-rule-verification.md @@ -0,0 +1,2 @@ +appwrite proxy updateRuleVerification \ + --ruleId [RULE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/create-bucket.md b/docs/examples/1.4.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 0000000000..25666885f7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,11 @@ +appwrite storage createBucket \ + --bucketId [BUCKET_ID] \ + --name [NAME] \ + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/create-file.md b/docs/examples/1.4.x/console-cli/examples/storage/create-file.md new file mode 100644 index 0000000000..e13b8d0e98 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,5 @@ +appwrite storage createFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] \ + --file 'path/to/file.png' \ + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/delete-bucket.md b/docs/examples/1.4.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..178a6a4b3a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,2 @@ +appwrite storage deleteBucket \ + --bucketId [BUCKET_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/delete-file.md b/docs/examples/1.4.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 0000000000..0275f87172 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,3 @@ +appwrite storage deleteFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-bucket-usage.md b/docs/examples/1.4.x/console-cli/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..930575e2e9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-bucket-usage.md @@ -0,0 +1,3 @@ +appwrite storage getBucketUsage \ + --bucketId [BUCKET_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-bucket.md b/docs/examples/1.4.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 0000000000..76479be7d6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,2 @@ +appwrite storage getBucket \ + --bucketId [BUCKET_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-file-download.md b/docs/examples/1.4.x/console-cli/examples/storage/get-file-download.md new file mode 100644 index 0000000000..637c7db1da --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,3 @@ +appwrite storage getFileDownload \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/1.4.x/console-cli/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..309088506b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +appwrite storage getFilePreview \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] \ + + + + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-file-view.md b/docs/examples/1.4.x/console-cli/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a8500f3597 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,3 @@ +appwrite storage getFileView \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-file.md b/docs/examples/1.4.x/console-cli/examples/storage/get-file.md new file mode 100644 index 0000000000..f556ef1d5c --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,3 @@ +appwrite storage getFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/storage/get-usage.md b/docs/examples/1.4.x/console-cli/examples/storage/get-usage.md new file mode 100644 index 0000000000..29466e02f0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/get-usage.md @@ -0,0 +1,2 @@ +appwrite storage getUsage \ + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/list-buckets.md b/docs/examples/1.4.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a5cad1988f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,3 @@ +appwrite storage listBuckets \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/list-files.md b/docs/examples/1.4.x/console-cli/examples/storage/list-files.md new file mode 100644 index 0000000000..062781feaf --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,4 @@ +appwrite storage listFiles \ + --bucketId [BUCKET_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/update-bucket.md b/docs/examples/1.4.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 0000000000..96132f4551 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,11 @@ +appwrite storage updateBucket \ + --bucketId [BUCKET_ID] \ + --name [NAME] \ + + + + + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/storage/update-file.md b/docs/examples/1.4.x/console-cli/examples/storage/update-file.md new file mode 100644 index 0000000000..6f6a9ca2f6 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +appwrite storage updateFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/teams/create-membership.md b/docs/examples/1.4.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 0000000000..6faa89d1d9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,8 @@ +appwrite teams createMembership \ + --teamId [TEAM_ID] \ + --roles one two three \ + --url https://example.com \ + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/teams/create.md b/docs/examples/1.4.x/console-cli/examples/teams/create.md new file mode 100644 index 0000000000..3704d02d0b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/create.md @@ -0,0 +1,4 @@ +appwrite teams create \ + --teamId [TEAM_ID] \ + --name [NAME] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/teams/delete-membership.md b/docs/examples/1.4.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 0000000000..6aaaf8902b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,3 @@ +appwrite teams deleteMembership \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/delete.md b/docs/examples/1.4.x/console-cli/examples/teams/delete.md new file mode 100644 index 0000000000..0a4d554b1b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/delete.md @@ -0,0 +1,2 @@ +appwrite teams delete \ + --teamId [TEAM_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/get-membership.md b/docs/examples/1.4.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 0000000000..25d11863b9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,3 @@ +appwrite teams getMembership \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/get-prefs.md b/docs/examples/1.4.x/console-cli/examples/teams/get-prefs.md new file mode 100644 index 0000000000..46d9edc3b7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/get-prefs.md @@ -0,0 +1,2 @@ +appwrite teams getPrefs \ + --teamId [TEAM_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/get.md b/docs/examples/1.4.x/console-cli/examples/teams/get.md new file mode 100644 index 0000000000..111aff623b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/get.md @@ -0,0 +1,2 @@ +appwrite teams get \ + --teamId [TEAM_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/list-logs.md b/docs/examples/1.4.x/console-cli/examples/teams/list-logs.md new file mode 100644 index 0000000000..81e09b93c3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/list-logs.md @@ -0,0 +1,3 @@ +appwrite teams listLogs \ + --teamId [TEAM_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/teams/list-memberships.md b/docs/examples/1.4.x/console-cli/examples/teams/list-memberships.md new file mode 100644 index 0000000000..367227fd08 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/list-memberships.md @@ -0,0 +1,4 @@ +appwrite teams listMemberships \ + --teamId [TEAM_ID] \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/teams/list.md b/docs/examples/1.4.x/console-cli/examples/teams/list.md new file mode 100644 index 0000000000..dfffc4d4dd --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/list.md @@ -0,0 +1,3 @@ +appwrite teams list \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/teams/update-membership-status.md b/docs/examples/1.4.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..0f3efc413a --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,5 @@ +appwrite teams updateMembershipStatus \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/update-membership.md b/docs/examples/1.4.x/console-cli/examples/teams/update-membership.md new file mode 100644 index 0000000000..96d2c2e684 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/update-membership.md @@ -0,0 +1,4 @@ +appwrite teams updateMembership \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] \ + --roles one two three diff --git a/docs/examples/1.4.x/console-cli/examples/teams/update-name.md b/docs/examples/1.4.x/console-cli/examples/teams/update-name.md new file mode 100644 index 0000000000..78b23e422f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/update-name.md @@ -0,0 +1,3 @@ +appwrite teams updateName \ + --teamId [TEAM_ID] \ + --name [NAME] diff --git a/docs/examples/1.4.x/console-cli/examples/teams/update-prefs.md b/docs/examples/1.4.x/console-cli/examples/teams/update-prefs.md new file mode 100644 index 0000000000..dbad52d3d2 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/teams/update-prefs.md @@ -0,0 +1,3 @@ +appwrite teams updatePrefs \ + --teamId [TEAM_ID] \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-argon2user.md b/docs/examples/1.4.x/console-cli/examples/users/create-argon2user.md new file mode 100644 index 0000000000..e215603b23 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-argon2user.md @@ -0,0 +1,5 @@ +appwrite users createArgon2User \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/console-cli/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..b4f121266b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-bcrypt-user.md @@ -0,0 +1,5 @@ +appwrite users createBcryptUser \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-m-d5user.md b/docs/examples/1.4.x/console-cli/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..4bb8cb4531 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-m-d5user.md @@ -0,0 +1,5 @@ +appwrite users createMD5User \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/console-cli/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..c0ebd7b0ec --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-p-h-pass-user.md @@ -0,0 +1,5 @@ +appwrite users createPHPassUser \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/console-cli/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..3aae965b68 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-s-h-a-user.md @@ -0,0 +1,6 @@ +appwrite users createSHAUser \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/console-cli/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..73b62b8424 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,8 @@ +appwrite users createScryptModifiedUser \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + --passwordSalt [PASSWORD_SALT] \ + --passwordSaltSeparator [PASSWORD_SALT_SEPARATOR] \ + --passwordSignerKey [PASSWORD_SIGNER_KEY] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/console-cli/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..595231ed11 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create-scrypt-user.md @@ -0,0 +1,10 @@ +appwrite users createScryptUser \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + --passwordSalt [PASSWORD_SALT] \ + --passwordCpu null \ + --passwordMemory null \ + --passwordParallel null \ + --passwordLength null \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/create.md b/docs/examples/1.4.x/console-cli/examples/users/create.md new file mode 100644 index 0000000000..c8a0d67003 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/create.md @@ -0,0 +1,6 @@ +appwrite users create \ + --userId [USER_ID] \ + + + + diff --git a/docs/examples/1.4.x/console-cli/examples/users/delete-identity.md b/docs/examples/1.4.x/console-cli/examples/users/delete-identity.md new file mode 100644 index 0000000000..f680f98390 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/delete-identity.md @@ -0,0 +1,2 @@ +appwrite users deleteIdentity \ + --identityId [IDENTITY_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/delete-session.md b/docs/examples/1.4.x/console-cli/examples/users/delete-session.md new file mode 100644 index 0000000000..e4b7632cf7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,3 @@ +appwrite users deleteSession \ + --userId [USER_ID] \ + --sessionId [SESSION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/delete-sessions.md b/docs/examples/1.4.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 0000000000..16c2c3a070 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,2 @@ +appwrite users deleteSessions \ + --userId [USER_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/delete.md b/docs/examples/1.4.x/console-cli/examples/users/delete.md new file mode 100644 index 0000000000..9c24060965 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/delete.md @@ -0,0 +1,2 @@ +appwrite users delete \ + --userId [USER_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/get-prefs.md b/docs/examples/1.4.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 0000000000..1aa1b1e332 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,2 @@ +appwrite users getPrefs \ + --userId [USER_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/get-usage.md b/docs/examples/1.4.x/console-cli/examples/users/get-usage.md new file mode 100644 index 0000000000..860cdc0c42 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/get-usage.md @@ -0,0 +1,3 @@ +appwrite users getUsage \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/users/get.md b/docs/examples/1.4.x/console-cli/examples/users/get.md new file mode 100644 index 0000000000..95f44afecf --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/get.md @@ -0,0 +1,2 @@ +appwrite users get \ + --userId [USER_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/list-identities.md b/docs/examples/1.4.x/console-cli/examples/users/list-identities.md new file mode 100644 index 0000000000..c6cd6d5e28 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/list-identities.md @@ -0,0 +1,3 @@ +appwrite users listIdentities \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/users/list-logs.md b/docs/examples/1.4.x/console-cli/examples/users/list-logs.md new file mode 100644 index 0000000000..257576fdb7 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/list-logs.md @@ -0,0 +1,3 @@ +appwrite users listLogs \ + --userId [USER_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/users/list-memberships.md b/docs/examples/1.4.x/console-cli/examples/users/list-memberships.md new file mode 100644 index 0000000000..44516c7a90 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/list-memberships.md @@ -0,0 +1,2 @@ +appwrite users listMemberships \ + --userId [USER_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/list-sessions.md b/docs/examples/1.4.x/console-cli/examples/users/list-sessions.md new file mode 100644 index 0000000000..2717411d22 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/list-sessions.md @@ -0,0 +1,2 @@ +appwrite users listSessions \ + --userId [USER_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/users/list.md b/docs/examples/1.4.x/console-cli/examples/users/list.md new file mode 100644 index 0000000000..e5fdb9e5c5 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/list.md @@ -0,0 +1,3 @@ +appwrite users list \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-email-verification.md b/docs/examples/1.4.x/console-cli/examples/users/update-email-verification.md new file mode 100644 index 0000000000..ab87d52212 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-email-verification.md @@ -0,0 +1,3 @@ +appwrite users updateEmailVerification \ + --userId [USER_ID] \ + --emailVerification false diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-email.md b/docs/examples/1.4.x/console-cli/examples/users/update-email.md new file mode 100644 index 0000000000..be8bb11607 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-email.md @@ -0,0 +1,3 @@ +appwrite users updateEmail \ + --userId [USER_ID] \ + --email email@example.com diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-labels.md b/docs/examples/1.4.x/console-cli/examples/users/update-labels.md new file mode 100644 index 0000000000..b02e533936 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-labels.md @@ -0,0 +1,3 @@ +appwrite users updateLabels \ + --userId [USER_ID] \ + --labels one two three diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-name.md b/docs/examples/1.4.x/console-cli/examples/users/update-name.md new file mode 100644 index 0000000000..ce9cad511b --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-name.md @@ -0,0 +1,3 @@ +appwrite users updateName \ + --userId [USER_ID] \ + --name [NAME] diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-password.md b/docs/examples/1.4.x/console-cli/examples/users/update-password.md new file mode 100644 index 0000000000..b4b7498249 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-password.md @@ -0,0 +1,3 @@ +appwrite users updatePassword \ + --userId [USER_ID] \ + --password '' diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-phone-verification.md b/docs/examples/1.4.x/console-cli/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..4cea770bd0 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite users updatePhoneVerification \ + --userId [USER_ID] \ + --phoneVerification false diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-phone.md b/docs/examples/1.4.x/console-cli/examples/users/update-phone.md new file mode 100644 index 0000000000..5909e68e64 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-phone.md @@ -0,0 +1,3 @@ +appwrite users updatePhone \ + --userId [USER_ID] \ + --number +12065550100 diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-prefs.md b/docs/examples/1.4.x/console-cli/examples/users/update-prefs.md new file mode 100644 index 0000000000..cc4a7422ac --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,3 @@ +appwrite users updatePrefs \ + --userId [USER_ID] \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.4.x/console-cli/examples/users/update-status.md b/docs/examples/1.4.x/console-cli/examples/users/update-status.md new file mode 100644 index 0000000000..6bc10ee5de --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/users/update-status.md @@ -0,0 +1,3 @@ +appwrite users updateStatus \ + --userId [USER_ID] \ + --status false diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/create-repository-detection.md b/docs/examples/1.4.x/console-cli/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..7fa1c56041 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/create-repository-detection.md @@ -0,0 +1,4 @@ +appwrite vcs createRepositoryDetection \ + --installationId [INSTALLATION_ID] \ + --providerRepositoryId [PROVIDER_REPOSITORY_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/create-repository.md b/docs/examples/1.4.x/console-cli/examples/vcs/create-repository.md new file mode 100644 index 0000000000..8d728e0c11 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/create-repository.md @@ -0,0 +1,4 @@ +appwrite vcs createRepository \ + --installationId [INSTALLATION_ID] \ + --name [NAME] \ + --private false diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/delete-installation.md b/docs/examples/1.4.x/console-cli/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..027e9f5d6f --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/delete-installation.md @@ -0,0 +1,2 @@ +appwrite vcs deleteInstallation \ + --installationId [INSTALLATION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/get-installation.md b/docs/examples/1.4.x/console-cli/examples/vcs/get-installation.md new file mode 100644 index 0000000000..bf62ddb1c9 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/get-installation.md @@ -0,0 +1,2 @@ +appwrite vcs getInstallation \ + --installationId [INSTALLATION_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/get-repository.md b/docs/examples/1.4.x/console-cli/examples/vcs/get-repository.md new file mode 100644 index 0000000000..b458a3be89 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/get-repository.md @@ -0,0 +1,3 @@ +appwrite vcs getRepository \ + --installationId [INSTALLATION_ID] \ + --providerRepositoryId [PROVIDER_REPOSITORY_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/list-installations.md b/docs/examples/1.4.x/console-cli/examples/vcs/list-installations.md new file mode 100644 index 0000000000..a0af28dfbb --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/list-installations.md @@ -0,0 +1,3 @@ +appwrite vcs listInstallations \ + + diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/list-repositories.md b/docs/examples/1.4.x/console-cli/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..5b03b77265 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/list-repositories.md @@ -0,0 +1,3 @@ +appwrite vcs listRepositories \ + --installationId [INSTALLATION_ID] \ + diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/list-repository-branches.md b/docs/examples/1.4.x/console-cli/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..8e69009ece --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/list-repository-branches.md @@ -0,0 +1,3 @@ +appwrite vcs listRepositoryBranches \ + --installationId [INSTALLATION_ID] \ + --providerRepositoryId [PROVIDER_REPOSITORY_ID] diff --git a/docs/examples/1.4.x/console-cli/examples/vcs/update-external-deployments.md b/docs/examples/1.4.x/console-cli/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..7eed90efe3 --- /dev/null +++ b/docs/examples/1.4.x/console-cli/examples/vcs/update-external-deployments.md @@ -0,0 +1,4 @@ +appwrite vcs updateExternalDeployments \ + --installationId [INSTALLATION_ID] \ + --repositoryId [REPOSITORY_ID] \ + --providerPullRequestId [PROVIDER_PULL_REQUEST_ID] diff --git a/docs/examples/1.4.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/1.4.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..9521cf68a5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createAnonymousSession(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-email-session.md b/docs/examples/1.4.x/console-web/examples/account/create-email-session.md new file mode 100644 index 0000000000..19812773df --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-email-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createEmailSession('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-j-w-t.md b/docs/examples/1.4.x/console-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..8a851df369 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createJWT(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-magic-u-r-l-session.md b/docs/examples/1.4.x/console-web/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..6917aa288c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createMagicURLSession('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.4.x/console-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..bf33c52f30 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-o-auth2session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +// Go to OAuth provider login page +account.createOAuth2Session('amazon'); + diff --git a/docs/examples/1.4.x/console-web/examples/account/create-phone-session.md b/docs/examples/1.4.x/console-web/examples/account/create-phone-session.md new file mode 100644 index 0000000000..85e7d68eed --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-phone-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createPhoneSession('[USER_ID]', '+12065550100'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-phone-verification.md b/docs/examples/1.4.x/console-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..0b10961e53 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-phone-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createPhoneVerification(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-recovery.md b/docs/examples/1.4.x/console-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..dd33c01f04 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create-verification.md b/docs/examples/1.4.x/console-web/examples/account/create-verification.md new file mode 100644 index 0000000000..7b1ec32f2f --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/create.md b/docs/examples/1.4.x/console-web/examples/account/create.md new file mode 100644 index 0000000000..4c61ef8eb2 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/create.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.create('[USER_ID]', 'email@example.com', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/delete-identity.md b/docs/examples/1.4.x/console-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..8e7a87270a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/delete-identity.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/delete-session.md b/docs/examples/1.4.x/console-web/examples/account/delete-session.md new file mode 100644 index 0000000000..b360b3bb89 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/delete-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/delete-sessions.md b/docs/examples/1.4.x/console-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..0d0fea88f4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.deleteSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/get-prefs.md b/docs/examples/1.4.x/console-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..284f8fabda --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.getPrefs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/get-session.md b/docs/examples/1.4.x/console-web/examples/account/get-session.md new file mode 100644 index 0000000000..651d35c734 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/get-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/get.md b/docs/examples/1.4.x/console-web/examples/account/get.md new file mode 100644 index 0000000000..f6fc4b9401 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/get.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/list-identities.md b/docs/examples/1.4.x/console-web/examples/account/list-identities.md new file mode 100644 index 0000000000..ea18a00081 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/list-identities.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.listIdentities(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/list-logs.md b/docs/examples/1.4.x/console-web/examples/account/list-logs.md new file mode 100644 index 0000000000..4f1d6813a7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/list-logs.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.listLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/list-sessions.md b/docs/examples/1.4.x/console-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..bd3b102b21 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/list-sessions.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.listSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-email.md b/docs/examples/1.4.x/console-web/examples/account/update-email.md new file mode 100644 index 0000000000..21b7fcc3f2 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-email.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.4.x/console-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..1bc748ed30 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-name.md b/docs/examples/1.4.x/console-web/examples/account/update-name.md new file mode 100644 index 0000000000..5a9ab011b4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-name.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-password.md b/docs/examples/1.4.x/console-web/examples/account/update-password.md new file mode 100644 index 0000000000..ca059e5304 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-password.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePassword(''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-phone-session.md b/docs/examples/1.4.x/console-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..4b47389a3c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-phone-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePhoneSession('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-phone-verification.md b/docs/examples/1.4.x/console-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..99c13cb90e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-phone-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-phone.md b/docs/examples/1.4.x/console-web/examples/account/update-phone.md new file mode 100644 index 0000000000..80f715e0bc --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-phone.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePhone('+12065550100', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-prefs.md b/docs/examples/1.4.x/console-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..0a85380d34 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-recovery.md b/docs/examples/1.4.x/console-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..64c1545e89 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-session.md b/docs/examples/1.4.x/console-web/examples/account/update-session.md new file mode 100644 index 0000000000..29dc0c0907 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-session.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-status.md b/docs/examples/1.4.x/console-web/examples/account/update-status.md new file mode 100644 index 0000000000..87b5146525 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-status.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateStatus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/account/update-verification.md b/docs/examples/1.4.x/console-web/examples/account/update-verification.md new file mode 100644 index 0000000000..93dd5db120 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/account/update-verification.md @@ -0,0 +1,18 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client(); + +const account = new Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/assistant/chat.md b/docs/examples/1.4.x/console-web/examples/assistant/chat.md new file mode 100644 index 0000000000..2806672a99 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/assistant/chat.md @@ -0,0 +1,17 @@ +import { Client, Assistant } from "@appwrite.io/console"; + +const client = new Client(); + +const assistant = new Assistant(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = assistant.chat('[PROMPT]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.4.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..f830effff2 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getBrowser('aa'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..a4e67b25e7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getCreditCard('amex'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-favicon.md b/docs/examples/1.4.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..14bc1b9b00 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getFavicon('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.4.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..52ebe68c65 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getFlag('af'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-image.md b/docs/examples/1.4.x/console-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..517421e7f0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getImage('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-initials.md b/docs/examples/1.4.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..8b03b5d386 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getInitials(); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/avatars/get-q-r.md b/docs/examples/1.4.x/console-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..89cea47ad9 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client(); + +const avatars = new Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = avatars.getQR('[TEXT]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/console/variables.md b/docs/examples/1.4.x/console-web/examples/console/variables.md new file mode 100644 index 0000000000..3c552dee38 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/console/variables.md @@ -0,0 +1,18 @@ +import { Client, Console } from "@appwrite.io/console"; + +const client = new Client(); + +const console = new Console(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = console.variables(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..3924ff5cc5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-collection.md b/docs/examples/1.4.x/console-web/examples/databases/create-collection.md new file mode 100644 index 0000000000..ff3dbd974d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..4e1f3190b3 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-document.md b/docs/examples/1.4.x/console-web/examples/databases/create-document.md new file mode 100644 index 0000000000..4b9adc4e7c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..8d2a5523b6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..503290b951 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..7ce41b6b0b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-float-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-index.md b/docs/examples/1.4.x/console-web/examples/databases/create-index.md new file mode 100644 index 0000000000..4da79809f4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-index.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createIndex('[DATABASE_ID]', '[COLLECTION_ID]', '', 'key', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..28218a16d7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-integer-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..88fcd66825 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..6fe22ad22e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-relationship-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '[RELATED_COLLECTION_ID]', 'oneToOne'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..8beade8f9d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-string-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', 1, false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..1cbd402c2e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.createUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/create.md b/docs/examples/1.4.x/console-web/examples/databases/create.md new file mode 100644 index 0000000000..bca894d724 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/create.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.create('[DATABASE_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/delete-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..858010b313 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/delete-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.deleteAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/delete-collection.md b/docs/examples/1.4.x/console-web/examples/databases/delete-collection.md new file mode 100644 index 0000000000..9ce95a5e54 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/delete-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.deleteCollection('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/delete-document.md b/docs/examples/1.4.x/console-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..d31d06b521 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/delete-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.deleteDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/delete-index.md b/docs/examples/1.4.x/console-web/examples/databases/delete-index.md new file mode 100644 index 0000000000..2ef22b82ad --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/delete-index.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.deleteIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/delete.md b/docs/examples/1.4.x/console-web/examples/databases/delete.md new file mode 100644 index 0000000000..bfd5b0cea3 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/delete.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.delete('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/get-attribute.md new file mode 100644 index 0000000000..1542f64763 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-collection-usage.md b/docs/examples/1.4.x/console-web/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..983a613373 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-collection-usage.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getCollectionUsage('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-collection.md b/docs/examples/1.4.x/console-web/examples/databases/get-collection.md new file mode 100644 index 0000000000..6dae02f5c2 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getCollection('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-database-usage.md b/docs/examples/1.4.x/console-web/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..f75040811e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-database-usage.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getDatabaseUsage('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-document.md b/docs/examples/1.4.x/console-web/examples/databases/get-document.md new file mode 100644 index 0000000000..87569bd863 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-index.md b/docs/examples/1.4.x/console-web/examples/databases/get-index.md new file mode 100644 index 0000000000..d3df35d7a7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-index.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get-usage.md b/docs/examples/1.4.x/console-web/examples/databases/get-usage.md new file mode 100644 index 0000000000..aabe123e89 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get-usage.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/get.md b/docs/examples/1.4.x/console-web/examples/databases/get.md new file mode 100644 index 0000000000..64c8a859ed --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/get.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.get('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-attributes.md b/docs/examples/1.4.x/console-web/examples/databases/list-attributes.md new file mode 100644 index 0000000000..df9123680e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-attributes.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listAttributes('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-collection-logs.md b/docs/examples/1.4.x/console-web/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..89662fe4b3 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-collection-logs.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listCollectionLogs('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-collections.md b/docs/examples/1.4.x/console-web/examples/databases/list-collections.md new file mode 100644 index 0000000000..498e0d9c13 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-collections.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listCollections('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-document-logs.md b/docs/examples/1.4.x/console-web/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..0161998358 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-document-logs.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listDocumentLogs('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-documents.md b/docs/examples/1.4.x/console-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..9e29eb52c7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-documents.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listDocuments('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-indexes.md b/docs/examples/1.4.x/console-web/examples/databases/list-indexes.md new file mode 100644 index 0000000000..3449b7d82b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-indexes.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listIndexes('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list-logs.md b/docs/examples/1.4.x/console-web/examples/databases/list-logs.md new file mode 100644 index 0000000000..3b3f0dcead --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list-logs.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.listLogs('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/list.md b/docs/examples/1.4.x/console-web/examples/databases/list.md new file mode 100644 index 0000000000..20ae55793d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/list.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..629f8644b0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-collection.md b/docs/examples/1.4.x/console-web/examples/databases/update-collection.md new file mode 100644 index 0000000000..c0043b2500 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..f5be61d0e6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-document.md b/docs/examples/1.4.x/console-web/examples/databases/update-document.md new file mode 100644 index 0000000000..249af34648 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-document.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e9a89a9436 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..8f0d5b6842 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false, '[DEFAULT]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..72fcd77e7b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-float-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..d035b842b1 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-integer-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..3373ae49ae --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..a329d5b6ad --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..69482531ed --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '[DEFAULT]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/console-web/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..481394021d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.updateUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/databases/update.md b/docs/examples/1.4.x/console-web/examples/databases/update.md new file mode 100644 index 0000000000..a8160956e5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/databases/update.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client(); + +const databases = new Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = databases.update('[DATABASE_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/create-build.md b/docs/examples/1.4.x/console-web/examples/functions/create-build.md new file mode 100644 index 0000000000..141bb3247c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/create-build.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.createBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/create-deployment.md b/docs/examples/1.4.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 0000000000..6a97468f85 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.createDeployment('[FUNCTION_ID]', document.getElementById('uploader').files[0], false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/create-execution.md b/docs/examples/1.4.x/console-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..cd623bb056 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/create-variable.md b/docs/examples/1.4.x/console-web/examples/functions/create-variable.md new file mode 100644 index 0000000000..df147ac2c8 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/create-variable.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.createVariable('[FUNCTION_ID]', '[KEY]', '[VALUE]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/create.md b/docs/examples/1.4.x/console-web/examples/functions/create.md new file mode 100644 index 0000000000..cbe62775f7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/create.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/delete-deployment.md b/docs/examples/1.4.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..9597da3dcf --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/delete-variable.md b/docs/examples/1.4.x/console-web/examples/functions/delete-variable.md new file mode 100644 index 0000000000..30f2c031aa --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/delete-variable.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.deleteVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/delete.md b/docs/examples/1.4.x/console-web/examples/functions/delete.md new file mode 100644 index 0000000000..3cfa756613 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/delete.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/download-deployment.md b/docs/examples/1.4.x/console-web/examples/functions/download-deployment.md new file mode 100644 index 0000000000..fc514e7cb4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/download-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = functions.downloadDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/get-deployment.md b/docs/examples/1.4.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 0000000000..3a16587aca --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/get-execution.md b/docs/examples/1.4.x/console-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..ac92b98af8 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/get-function-usage.md b/docs/examples/1.4.x/console-web/examples/functions/get-function-usage.md new file mode 100644 index 0000000000..9ac20346ea --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/get-function-usage.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.getFunctionUsage('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/get-usage.md b/docs/examples/1.4.x/console-web/examples/functions/get-usage.md new file mode 100644 index 0000000000..6e3fe87860 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/get-usage.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/get-variable.md b/docs/examples/1.4.x/console-web/examples/functions/get-variable.md new file mode 100644 index 0000000000..3d4b07f44e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/get-variable.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.getVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/get.md b/docs/examples/1.4.x/console-web/examples/functions/get.md new file mode 100644 index 0000000000..5cb2e28910 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/get.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/list-deployments.md b/docs/examples/1.4.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 0000000000..bd63271f27 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.listDeployments('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/list-executions.md b/docs/examples/1.4.x/console-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..5df980d48b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/list-runtimes.md b/docs/examples/1.4.x/console-web/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..18f13b2c83 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.listRuntimes(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/list-variables.md b/docs/examples/1.4.x/console-web/examples/functions/list-variables.md new file mode 100644 index 0000000000..5fd03bfc19 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/list-variables.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.listVariables('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/list.md b/docs/examples/1.4.x/console-web/examples/functions/list.md new file mode 100644 index 0000000000..721ad6bbb0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/list.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/update-deployment.md b/docs/examples/1.4.x/console-web/examples/functions/update-deployment.md new file mode 100644 index 0000000000..98752326ef --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/update-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/update-variable.md b/docs/examples/1.4.x/console-web/examples/functions/update-variable.md new file mode 100644 index 0000000000..33380ee102 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.updateVariable('[FUNCTION_ID]', '[VARIABLE_ID]', '[KEY]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/functions/update.md b/docs/examples/1.4.x/console-web/examples/functions/update.md new file mode 100644 index 0000000000..ec062bc2c6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/functions/update.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client(); + +const functions = new Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/graphql/mutation.md b/docs/examples/1.4.x/console-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..ee70c3630c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/graphql/mutation.md @@ -0,0 +1,18 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client(); + +const graphql = new Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = graphql.mutation({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/graphql/query.md b/docs/examples/1.4.x/console-web/examples/graphql/query.md new file mode 100644 index 0000000000..055c6ad002 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/graphql/query.md @@ -0,0 +1,18 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client(); + +const graphql = new Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = graphql.query({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-antivirus.md b/docs/examples/1.4.x/console-web/examples/health/get-antivirus.md new file mode 100644 index 0000000000..6d57550dd9 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-antivirus.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getAntivirus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-cache.md b/docs/examples/1.4.x/console-web/examples/health/get-cache.md new file mode 100644 index 0000000000..5748c8e9dc --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-cache.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getCache(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-d-b.md b/docs/examples/1.4.x/console-web/examples/health/get-d-b.md new file mode 100644 index 0000000000..181dca7076 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-d-b.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getDB(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-pub-sub.md b/docs/examples/1.4.x/console-web/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..a56abb704d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-pub-sub.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getPubSub(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/console-web/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..29fcb6707a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-queue-certificates.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-queue-functions.md b/docs/examples/1.4.x/console-web/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..0b011cb32d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-queue-functions.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-queue-logs.md b/docs/examples/1.4.x/console-web/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..2dc33b377b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-queue-logs.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/console-web/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..534d68c7f4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-queue-webhooks.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-queue.md b/docs/examples/1.4.x/console-web/examples/health/get-queue.md new file mode 100644 index 0000000000..bdc3caf749 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-queue.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getQueue(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-storage-local.md b/docs/examples/1.4.x/console-web/examples/health/get-storage-local.md new file mode 100644 index 0000000000..ff842f4ba6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-storage-local.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get-time.md b/docs/examples/1.4.x/console-web/examples/health/get-time.md new file mode 100644 index 0000000000..6d8e1c225a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get-time.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.getTime(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/health/get.md b/docs/examples/1.4.x/console-web/examples/health/get.md new file mode 100644 index 0000000000..76e74be74c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/health/get.md @@ -0,0 +1,18 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client(); + +const health = new Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = health.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/get.md b/docs/examples/1.4.x/console-web/examples/locale/get.md new file mode 100644 index 0000000000..ac47468df8 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/get.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-codes.md b/docs/examples/1.4.x/console-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..9cb13350b3 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-codes.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCodes(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-continents.md b/docs/examples/1.4.x/console-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..b2358396fc --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-continents.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listContinents(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/console-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..59d6e24dbf --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCountriesEU(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/console-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..898cb3cf31 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-countries-phones.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCountriesPhones(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-countries.md b/docs/examples/1.4.x/console-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..a36b8c25ed --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-countries.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCountries(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-currencies.md b/docs/examples/1.4.x/console-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..1f34891425 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-currencies.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listCurrencies(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/locale/list-languages.md b/docs/examples/1.4.x/console-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..4fb4dbf0be --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/locale/list-languages.md @@ -0,0 +1,18 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client(); + +const locale = new Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = locale.listLanguages(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/create-appwrite-migration.md b/docs/examples/1.4.x/console-web/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..7001e18204 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.createAppwriteMigration([], 'https://example.com', '[PROJECT_ID]', '[API_KEY]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/create-firebase-migration.md b/docs/examples/1.4.x/console-web/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..de5becb5ca --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/create-firebase-migration.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.createFirebaseMigration([], '[SERVICE_ACCOUNT]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/create-firebase-o-auth-migration.md b/docs/examples/1.4.x/console-web/examples/migrations/create-firebase-o-auth-migration.md new file mode 100644 index 0000000000..07e3efb080 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/create-firebase-o-auth-migration.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.createFirebaseOAuthMigration([], '[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/create-n-host-migration.md b/docs/examples/1.4.x/console-web/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..b9a614d44a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/create-n-host-migration.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.createNHostMigration([], '[SUBDOMAIN]', '[REGION]', '[ADMIN_SECRET]', '[DATABASE]', '[USERNAME]', '[PASSWORD]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/create-supabase-migration.md b/docs/examples/1.4.x/console-web/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..38b533f66b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/create-supabase-migration.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.createSupabaseMigration([], 'https://example.com', '[API_KEY]', '[DATABASE_HOST]', '[USERNAME]', '[PASSWORD]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/delete-firebase-auth.md b/docs/examples/1.4.x/console-web/examples/migrations/delete-firebase-auth.md new file mode 100644 index 0000000000..b7d890a28a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/delete-firebase-auth.md @@ -0,0 +1,17 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = migrations.deleteFirebaseAuth(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/delete.md b/docs/examples/1.4.x/console-web/examples/migrations/delete.md new file mode 100644 index 0000000000..88d8262718 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/delete.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.delete('[MIGRATION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/get-appwrite-report.md b/docs/examples/1.4.x/console-web/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..0b922b2bc5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/get-appwrite-report.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.getAppwriteReport([], 'https://example.com', '[PROJECT_ID]', '[KEY]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report-o-auth.md b/docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report-o-auth.md new file mode 100644 index 0000000000..7b52ac95b7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report-o-auth.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.getFirebaseReportOAuth([], '[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report.md b/docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..3764d786a6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/get-firebase-report.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.getFirebaseReport([], '[SERVICE_ACCOUNT]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/get-n-host-report.md b/docs/examples/1.4.x/console-web/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..34d3404408 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/get-n-host-report.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.getNHostReport([], '[SUBDOMAIN]', '[REGION]', '[ADMIN_SECRET]', '[DATABASE]', '[USERNAME]', '[PASSWORD]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/get-supabase-report.md b/docs/examples/1.4.x/console-web/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..00fbb9e56f --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/get-supabase-report.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.getSupabaseReport([], 'https://example.com', '[API_KEY]', '[DATABASE_HOST]', '[USERNAME]', '[PASSWORD]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/get.md b/docs/examples/1.4.x/console-web/examples/migrations/get.md new file mode 100644 index 0000000000..1331be2543 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/get.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.get('[MIGRATION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/list-firebase-projects.md b/docs/examples/1.4.x/console-web/examples/migrations/list-firebase-projects.md new file mode 100644 index 0000000000..e653144357 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/list-firebase-projects.md @@ -0,0 +1,17 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = migrations.listFirebaseProjects(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/list.md b/docs/examples/1.4.x/console-web/examples/migrations/list.md new file mode 100644 index 0000000000..61f7754aff --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/list.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/migrations/retry.md b/docs/examples/1.4.x/console-web/examples/migrations/retry.md new file mode 100644 index 0000000000..4c39d98c5d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/migrations/retry.md @@ -0,0 +1,18 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client(); + +const migrations = new Migrations(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = migrations.retry('[MIGRATION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/project/create-variable.md b/docs/examples/1.4.x/console-web/examples/project/create-variable.md new file mode 100644 index 0000000000..94c0f04fe0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/project/create-variable.md @@ -0,0 +1,18 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client(); + +const project = new Project(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = project.createVariable('[KEY]', '[VALUE]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/project/delete-variable.md b/docs/examples/1.4.x/console-web/examples/project/delete-variable.md new file mode 100644 index 0000000000..23c4144e39 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/project/delete-variable.md @@ -0,0 +1,18 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client(); + +const project = new Project(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = project.deleteVariable('[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/project/get-usage.md b/docs/examples/1.4.x/console-web/examples/project/get-usage.md new file mode 100644 index 0000000000..c831a06ff1 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/project/get-usage.md @@ -0,0 +1,18 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client(); + +const project = new Project(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = project.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/project/get-variable.md b/docs/examples/1.4.x/console-web/examples/project/get-variable.md new file mode 100644 index 0000000000..c147f638e5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/project/get-variable.md @@ -0,0 +1,18 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client(); + +const project = new Project(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = project.getVariable('[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/project/list-variables.md b/docs/examples/1.4.x/console-web/examples/project/list-variables.md new file mode 100644 index 0000000000..facfc32163 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/project/list-variables.md @@ -0,0 +1,18 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client(); + +const project = new Project(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = project.listVariables(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/project/update-variable.md b/docs/examples/1.4.x/console-web/examples/project/update-variable.md new file mode 100644 index 0000000000..57590189dc --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/project/update-variable.md @@ -0,0 +1,18 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client(); + +const project = new Project(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = project.updateVariable('[VARIABLE_ID]', '[KEY]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/create-key.md b/docs/examples/1.4.x/console-web/examples/projects/create-key.md new file mode 100644 index 0000000000..02032e81c5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/create-key.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.createKey('[PROJECT_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/create-platform.md b/docs/examples/1.4.x/console-web/examples/projects/create-platform.md new file mode 100644 index 0000000000..4a31968171 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/create-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/create-webhook.md b/docs/examples/1.4.x/console-web/examples/projects/create-webhook.md new file mode 100644 index 0000000000..356a5ffe86 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/create-webhook.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/create.md b/docs/examples/1.4.x/console-web/examples/projects/create.md new file mode 100644 index 0000000000..87eab0aea0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/create.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.create('', '[NAME]', '[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/delete-email-template.md b/docs/examples/1.4.x/console-web/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..0df4a1db5c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/delete-email-template.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.deleteEmailTemplate('[PROJECT_ID]', 'verification', 'af'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/delete-key.md b/docs/examples/1.4.x/console-web/examples/projects/delete-key.md new file mode 100644 index 0000000000..74c6bd1562 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/delete-key.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/delete-platform.md b/docs/examples/1.4.x/console-web/examples/projects/delete-platform.md new file mode 100644 index 0000000000..da8ce56e54 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/delete-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/delete-sms-template.md b/docs/examples/1.4.x/console-web/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..ba0bc8ead3 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/delete-sms-template.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.deleteSmsTemplate('[PROJECT_ID]', 'verification', 'af'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/delete-webhook.md b/docs/examples/1.4.x/console-web/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..08e3af636f --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/delete-webhook.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/delete.md b/docs/examples/1.4.x/console-web/examples/projects/delete.md new file mode 100644 index 0000000000..4f227a49a6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/delete.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.delete('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get-email-template.md b/docs/examples/1.4.x/console-web/examples/projects/get-email-template.md new file mode 100644 index 0000000000..f7c193b95d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get-email-template.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.getEmailTemplate('[PROJECT_ID]', 'verification', 'af'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get-key.md b/docs/examples/1.4.x/console-web/examples/projects/get-key.md new file mode 100644 index 0000000000..c0d3282c14 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get-key.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.getKey('[PROJECT_ID]', '[KEY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get-platform.md b/docs/examples/1.4.x/console-web/examples/projects/get-platform.md new file mode 100644 index 0000000000..fd65231aff --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get-sms-template.md b/docs/examples/1.4.x/console-web/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..5fce9ffcfb --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get-sms-template.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.getSmsTemplate('[PROJECT_ID]', 'verification', 'af'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get-usage.md b/docs/examples/1.4.x/console-web/examples/projects/get-usage.md new file mode 100644 index 0000000000..8d8c91355d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get-usage.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.getUsage('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get-webhook.md b/docs/examples/1.4.x/console-web/examples/projects/get-webhook.md new file mode 100644 index 0000000000..7f580b5f57 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get-webhook.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/get.md b/docs/examples/1.4.x/console-web/examples/projects/get.md new file mode 100644 index 0000000000..23c235a741 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/get.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.get('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/list-keys.md b/docs/examples/1.4.x/console-web/examples/projects/list-keys.md new file mode 100644 index 0000000000..c2dce0a419 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/list-keys.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.listKeys('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/list-platforms.md b/docs/examples/1.4.x/console-web/examples/projects/list-platforms.md new file mode 100644 index 0000000000..968438f6bb --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/list-platforms.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.listPlatforms('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/list-webhooks.md b/docs/examples/1.4.x/console-web/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..e0e0af367f --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/list-webhooks.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.listWebhooks('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/list.md b/docs/examples/1.4.x/console-web/examples/projects/list.md new file mode 100644 index 0000000000..0cf5002afe --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/list.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-auth-duration.md b/docs/examples/1.4.x/console-web/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..37c69222df --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-auth-duration.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateAuthDuration('[PROJECT_ID]', 0); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/1.4.x/console-web/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..a63f5b4518 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-auth-limit.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateAuthLimit('[PROJECT_ID]', 0); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.4.x/console-web/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..e3cb529d1b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateAuthPasswordDictionary('[PROJECT_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-auth-password-history.md b/docs/examples/1.4.x/console-web/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..67b885d49d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-auth-password-history.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateAuthPasswordHistory('[PROJECT_ID]', 0); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.4.x/console-web/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..ef2dffa67a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateAuthSessionsLimit('[PROJECT_ID]', 1); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-auth-status.md b/docs/examples/1.4.x/console-web/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..4751442d8f --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-auth-status.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateAuthStatus('[PROJECT_ID]', 'email-password', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-email-template.md b/docs/examples/1.4.x/console-web/examples/projects/update-email-template.md new file mode 100644 index 0000000000..b49594768a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-email-template.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateEmailTemplate('[PROJECT_ID]', 'verification', 'af', '[SUBJECT]', '[MESSAGE]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-key.md b/docs/examples/1.4.x/console-web/examples/projects/update-key.md new file mode 100644 index 0000000000..fd2bde82bf --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-key.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/1.4.x/console-web/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..34ce814208 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-o-auth2.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateOAuth2('[PROJECT_ID]', 'amazon'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-personal-data-check.md b/docs/examples/1.4.x/console-web/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..6165e91b80 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-personal-data-check.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updatePersonalDataCheck('[PROJECT_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-platform.md b/docs/examples/1.4.x/console-web/examples/projects/update-platform.md new file mode 100644 index 0000000000..ce49dfffd8 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-service-status-all.md b/docs/examples/1.4.x/console-web/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..d348067194 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-service-status-all.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateServiceStatusAll('[PROJECT_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-service-status.md b/docs/examples/1.4.x/console-web/examples/projects/update-service-status.md new file mode 100644 index 0000000000..5b727003b0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-service-status.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateServiceStatus('[PROJECT_ID]', 'account', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-sms-template.md b/docs/examples/1.4.x/console-web/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..54edccd2aa --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-sms-template.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateSmsTemplate('[PROJECT_ID]', 'verification', 'af', '[MESSAGE]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-smtp-configuration.md b/docs/examples/1.4.x/console-web/examples/projects/update-smtp-configuration.md new file mode 100644 index 0000000000..54f344e3a6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-smtp-configuration.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateSmtpConfiguration('[PROJECT_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-team.md b/docs/examples/1.4.x/console-web/examples/projects/update-team.md new file mode 100644 index 0000000000..8b1c2f5665 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-team.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateTeam('[PROJECT_ID]', '[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/1.4.x/console-web/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..472271f8e6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-webhook-signature.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateWebhookSignature('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update-webhook.md b/docs/examples/1.4.x/console-web/examples/projects/update-webhook.md new file mode 100644 index 0000000000..1339a45822 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update-webhook.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/projects/update.md b/docs/examples/1.4.x/console-web/examples/projects/update.md new file mode 100644 index 0000000000..31281808c4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/projects/update.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client(); + +const projects = new Projects(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = projects.update('[PROJECT_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/proxy/create-rule.md b/docs/examples/1.4.x/console-web/examples/proxy/create-rule.md new file mode 100644 index 0000000000..fc11d86b97 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/proxy/create-rule.md @@ -0,0 +1,18 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client(); + +const proxy = new Proxy(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = proxy.createRule('', 'api'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/proxy/delete-rule.md b/docs/examples/1.4.x/console-web/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..f21e4f2528 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/proxy/delete-rule.md @@ -0,0 +1,18 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client(); + +const proxy = new Proxy(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = proxy.deleteRule('[RULE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/proxy/get-rule.md b/docs/examples/1.4.x/console-web/examples/proxy/get-rule.md new file mode 100644 index 0000000000..99ddbca273 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/proxy/get-rule.md @@ -0,0 +1,18 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client(); + +const proxy = new Proxy(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = proxy.getRule('[RULE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/proxy/list-rules.md b/docs/examples/1.4.x/console-web/examples/proxy/list-rules.md new file mode 100644 index 0000000000..baa277339c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/proxy/list-rules.md @@ -0,0 +1,18 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client(); + +const proxy = new Proxy(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = proxy.listRules(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/proxy/update-rule-verification.md b/docs/examples/1.4.x/console-web/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..33b442220c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/proxy/update-rule-verification.md @@ -0,0 +1,18 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client(); + +const proxy = new Proxy(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = proxy.updateRuleVerification('[RULE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/create-bucket.md b/docs/examples/1.4.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 0000000000..7696b14294 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.createBucket('[BUCKET_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/create-file.md b/docs/examples/1.4.x/console-web/examples/storage/create-file.md new file mode 100644 index 0000000000..d1bf55b42b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/create-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/delete-bucket.md b/docs/examples/1.4.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..4634b11f5b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.deleteBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/delete-file.md b/docs/examples/1.4.x/console-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..b4c0ff0f9d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/1.4.x/console-web/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..65c66d7aa0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-bucket-usage.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.getBucketUsage('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-bucket.md b/docs/examples/1.4.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 0000000000..2b65e8b0ce --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.getBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.4.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..1ce57cb38a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.4.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ab6bc18fc4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.4.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..7ce851f025 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-file.md b/docs/examples/1.4.x/console-web/examples/storage/get-file.md new file mode 100644 index 0000000000..b6e800303d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/get-usage.md b/docs/examples/1.4.x/console-web/examples/storage/get-usage.md new file mode 100644 index 0000000000..f618ba4e16 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/get-usage.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/list-buckets.md b/docs/examples/1.4.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 0000000000..5a356900fa --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.listBuckets(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/list-files.md b/docs/examples/1.4.x/console-web/examples/storage/list-files.md new file mode 100644 index 0000000000..0c6170f11d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/list-files.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/update-bucket.md b/docs/examples/1.4.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 0000000000..09ed4ce441 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.updateBucket('[BUCKET_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/storage/update-file.md b/docs/examples/1.4.x/console-web/examples/storage/update-file.md new file mode 100644 index 0000000000..abaaf9afd4 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/storage/update-file.md @@ -0,0 +1,18 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client(); + +const storage = new Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/create-membership.md b/docs/examples/1.4.x/console-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..ddd4861137 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/create.md b/docs/examples/1.4.x/console-web/examples/teams/create.md new file mode 100644 index 0000000000..a2cb34296b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/create.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/delete-membership.md b/docs/examples/1.4.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..4e7d7e7a74 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/delete.md b/docs/examples/1.4.x/console-web/examples/teams/delete.md new file mode 100644 index 0000000000..0bc778ba63 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/delete.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/get-membership.md b/docs/examples/1.4.x/console-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..c0bdae5fc6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/get-prefs.md b/docs/examples/1.4.x/console-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..2104c5f898 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/get-prefs.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.getPrefs('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/get.md b/docs/examples/1.4.x/console-web/examples/teams/get.md new file mode 100644 index 0000000000..2dbfdb4b0b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/get.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/list-logs.md b/docs/examples/1.4.x/console-web/examples/teams/list-logs.md new file mode 100644 index 0000000000..2c3c7311e2 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/list-logs.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.listLogs('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/list-memberships.md b/docs/examples/1.4.x/console-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..f7a7d1a54e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/list-memberships.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.listMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/list.md b/docs/examples/1.4.x/console-web/examples/teams/list.md new file mode 100644 index 0000000000..99e482d8f3 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/list.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/update-membership-status.md b/docs/examples/1.4.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..1c8ec3a27e --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/update-membership.md b/docs/examples/1.4.x/console-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..1f9051fa77 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/update-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updateMembership('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/update-name.md b/docs/examples/1.4.x/console-web/examples/teams/update-name.md new file mode 100644 index 0000000000..4bee8deb52 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/update-name.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updateName('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/teams/update-prefs.md b/docs/examples/1.4.x/console-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..7d7ed63328 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/teams/update-prefs.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client(); + +const teams = new Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = teams.updatePrefs('[TEAM_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-argon2user.md b/docs/examples/1.4.x/console-web/examples/users/create-argon2user.md new file mode 100644 index 0000000000..f4dabafe18 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-argon2user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createArgon2User('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/console-web/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..247f579c9c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-bcrypt-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createBcryptUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-m-d5user.md b/docs/examples/1.4.x/console-web/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..8a81f0801b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-m-d5user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createMD5User('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/console-web/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..f7297c1023 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-p-h-pass-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createPHPassUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/console-web/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..3cefaf17df --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createSHAUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/console-web/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d8889fa229 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createScryptModifiedUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', '[PASSWORD_SALT_SEPARATOR]', '[PASSWORD_SIGNER_KEY]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/console-web/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..3c4b357e4c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create-scrypt-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.createScryptUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', null, null, null, null); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/create.md b/docs/examples/1.4.x/console-web/examples/users/create.md new file mode 100644 index 0000000000..845895d6a5 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/create.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.create('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/delete-identity.md b/docs/examples/1.4.x/console-web/examples/users/delete-identity.md new file mode 100644 index 0000000000..d2aa30d34b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/delete-identity.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/delete-session.md b/docs/examples/1.4.x/console-web/examples/users/delete-session.md new file mode 100644 index 0000000000..70404ca574 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/delete-session.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/delete-sessions.md b/docs/examples/1.4.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 0000000000..b02771c709 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/delete.md b/docs/examples/1.4.x/console-web/examples/users/delete.md new file mode 100644 index 0000000000..0bb95c395b --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/delete.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.delete('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/get-prefs.md b/docs/examples/1.4.x/console-web/examples/users/get-prefs.md new file mode 100644 index 0000000000..593552bd03 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/get-usage.md b/docs/examples/1.4.x/console-web/examples/users/get-usage.md new file mode 100644 index 0000000000..59d95e6dcb --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/get-usage.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/get.md b/docs/examples/1.4.x/console-web/examples/users/get.md new file mode 100644 index 0000000000..46cee750f7 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/get.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/list-identities.md b/docs/examples/1.4.x/console-web/examples/users/list-identities.md new file mode 100644 index 0000000000..214fa9728d --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/list-identities.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.listIdentities(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/list-logs.md b/docs/examples/1.4.x/console-web/examples/users/list-logs.md new file mode 100644 index 0000000000..ded1e98b40 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/list-logs.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.listLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/list-memberships.md b/docs/examples/1.4.x/console-web/examples/users/list-memberships.md new file mode 100644 index 0000000000..b47f7acf57 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/list-memberships.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.listMemberships('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/list-sessions.md b/docs/examples/1.4.x/console-web/examples/users/list-sessions.md new file mode 100644 index 0000000000..087834e569 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/list-sessions.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.listSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/list.md b/docs/examples/1.4.x/console-web/examples/users/list.md new file mode 100644 index 0000000000..28a8258b12 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/list.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-email-verification.md b/docs/examples/1.4.x/console-web/examples/users/update-email-verification.md new file mode 100644 index 0000000000..019b072371 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-email-verification.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updateEmailVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-email.md b/docs/examples/1.4.x/console-web/examples/users/update-email.md new file mode 100644 index 0000000000..e37d03a01c --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-email.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updateEmail('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-labels.md b/docs/examples/1.4.x/console-web/examples/users/update-labels.md new file mode 100644 index 0000000000..9d61425d70 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-labels.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updateLabels('[USER_ID]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-name.md b/docs/examples/1.4.x/console-web/examples/users/update-name.md new file mode 100644 index 0000000000..2834c747da --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-name.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updateName('[USER_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-password.md b/docs/examples/1.4.x/console-web/examples/users/update-password.md new file mode 100644 index 0000000000..5192abda89 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-password.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updatePassword('[USER_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-phone-verification.md b/docs/examples/1.4.x/console-web/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..17ddf467d9 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-phone-verification.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updatePhoneVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-phone.md b/docs/examples/1.4.x/console-web/examples/users/update-phone.md new file mode 100644 index 0000000000..a1d85aaaca --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-phone.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updatePhone('[USER_ID]', '+12065550100'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-prefs.md b/docs/examples/1.4.x/console-web/examples/users/update-prefs.md new file mode 100644 index 0000000000..e3c5b76c2a --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/users/update-status.md b/docs/examples/1.4.x/console-web/examples/users/update-status.md new file mode 100644 index 0000000000..eafbec728f --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/users/update-status.md @@ -0,0 +1,18 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client(); + +const users = new Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +const promise = users.updateStatus('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/create-repository-detection.md b/docs/examples/1.4.x/console-web/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..cc445939e0 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/create-repository-detection.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.createRepositoryDetection('[INSTALLATION_ID]', '[PROVIDER_REPOSITORY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/create-repository.md b/docs/examples/1.4.x/console-web/examples/vcs/create-repository.md new file mode 100644 index 0000000000..7dbc238034 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/create-repository.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.createRepository('[INSTALLATION_ID]', '[NAME]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/delete-installation.md b/docs/examples/1.4.x/console-web/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..390b5afc24 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/delete-installation.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.deleteInstallation('[INSTALLATION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/get-installation.md b/docs/examples/1.4.x/console-web/examples/vcs/get-installation.md new file mode 100644 index 0000000000..c3fb9861d8 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/get-installation.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.getInstallation('[INSTALLATION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/get-repository.md b/docs/examples/1.4.x/console-web/examples/vcs/get-repository.md new file mode 100644 index 0000000000..63253a6aed --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/get-repository.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.getRepository('[INSTALLATION_ID]', '[PROVIDER_REPOSITORY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/list-installations.md b/docs/examples/1.4.x/console-web/examples/vcs/list-installations.md new file mode 100644 index 0000000000..474fb07ea6 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/list-installations.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.listInstallations(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.4.x/console-web/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..db4920f960 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/list-repositories.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.listRepositories('[INSTALLATION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/list-repository-branches.md b/docs/examples/1.4.x/console-web/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..f29ff96fda --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/list-repository-branches.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.listRepositoryBranches('[INSTALLATION_ID]', '[PROVIDER_REPOSITORY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/console-web/examples/vcs/update-external-deployments.md b/docs/examples/1.4.x/console-web/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..648ce30785 --- /dev/null +++ b/docs/examples/1.4.x/console-web/examples/vcs/update-external-deployments.md @@ -0,0 +1,17 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client(); + +const vcs = new Vcs(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +; + +const promise = vcs.updateExternalDeployments('[INSTALLATION_ID]', '[REPOSITORY_ID]', '[PROVIDER_PULL_REQUEST_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-dart/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..912f8c3b1e --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/create-phone-verification.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.createPhoneVerification(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/create-recovery.md b/docs/examples/1.4.x/server-dart/examples/account/create-recovery.md new file mode 100644 index 0000000000..d9f13957c7 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/create-recovery.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/create-verification.md b/docs/examples/1.4.x/server-dart/examples/account/create-verification.md new file mode 100644 index 0000000000..cca3c7b774 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/create-verification.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.createVerification( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/delete-identity.md b/docs/examples/1.4.x/server-dart/examples/account/delete-identity.md new file mode 100644 index 0000000000..7b8f09a353 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/delete-identity.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.deleteIdentity( + identityId: '[IDENTITY_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/delete-session.md b/docs/examples/1.4.x/server-dart/examples/account/delete-session.md new file mode 100644 index 0000000000..9486ec9b80 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/delete-session.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.deleteSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-dart/examples/account/delete-sessions.md new file mode 100644 index 0000000000..a5732cb68e --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/delete-sessions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.deleteSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/get-prefs.md b/docs/examples/1.4.x/server-dart/examples/account/get-prefs.md new file mode 100644 index 0000000000..527a71f3b1 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/get-prefs.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.getPrefs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/get-session.md b/docs/examples/1.4.x/server-dart/examples/account/get-session.md new file mode 100644 index 0000000000..6eb711ab4d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/get-session.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.getSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/get.md b/docs/examples/1.4.x/server-dart/examples/account/get.md new file mode 100644 index 0000000000..c72fdddb10 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/list-identities.md b/docs/examples/1.4.x/server-dart/examples/account/list-identities.md new file mode 100644 index 0000000000..63789e529f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/list-identities.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.listIdentities( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/list-logs.md b/docs/examples/1.4.x/server-dart/examples/account/list-logs.md new file mode 100644 index 0000000000..68d2c49f74 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/list-logs.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.listLogs( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/list-sessions.md b/docs/examples/1.4.x/server-dart/examples/account/list-sessions.md new file mode 100644 index 0000000000..0d6567b5f3 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/list-sessions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.listSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-email.md b/docs/examples/1.4.x/server-dart/examples/account/update-email.md new file mode 100644 index 0000000000..b83f7d86da --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-email.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateEmail( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-name.md b/docs/examples/1.4.x/server-dart/examples/account/update-name.md new file mode 100644 index 0000000000..0bd27cf204 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-name.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateName( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-password.md b/docs/examples/1.4.x/server-dart/examples/account/update-password.md new file mode 100644 index 0000000000..d5e27a7574 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-password.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updatePassword( + password: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-dart/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f2995b9b93 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-phone-verification.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updatePhoneVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-phone.md b/docs/examples/1.4.x/server-dart/examples/account/update-phone.md new file mode 100644 index 0000000000..5848da5d10 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-phone.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updatePhone( + phone: '+12065550100', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-prefs.md b/docs/examples/1.4.x/server-dart/examples/account/update-prefs.md new file mode 100644 index 0000000000..ffbe700288 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updatePrefs( + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-recovery.md b/docs/examples/1.4.x/server-dart/examples/account/update-recovery.md new file mode 100644 index 0000000000..c2cf9d2396 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-recovery.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateRecovery( + userId: '[USER_ID]', + secret: '[SECRET]', + password: 'password', + passwordAgain: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-session.md b/docs/examples/1.4.x/server-dart/examples/account/update-session.md new file mode 100644 index 0000000000..61e11e27af --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-session.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-status.md b/docs/examples/1.4.x/server-dart/examples/account/update-status.md new file mode 100644 index 0000000000..12f733334a --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-status.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateStatus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/account/update-verification.md b/docs/examples/1.4.x/server-dart/examples/account/update-verification.md new file mode 100644 index 0000000000..40e36426a1 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/account/update-verification.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..0bac9df4ef --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getBrowser( + code: 'aa', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..b9a8166e48 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getCreditCard( + code: 'amex', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6a728e7792 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getFavicon( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..02e4880926 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getFlag( + code: 'af', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-image.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..b1d5e33884 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-image.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getImage( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..5a68caf1d9 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getInitials( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..8283b9bdf4 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getQR( + text: '[TEXT]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..224719685b --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-boolean-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createBooleanAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-collection.md b/docs/examples/1.4.x/server-dart/examples/databases/create-collection.md new file mode 100644 index 0000000000..c90183deed --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-collection.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createCollection( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..24c44088f3 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-datetime-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createDatetimeAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-document.md b/docs/examples/1.4.x/server-dart/examples/databases/create-document.md new file mode 100644 index 0000000000..00d844da0f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-document.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..92fd32037b --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-email-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createEmailAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..fa8ad92015 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-enum-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createEnumAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + elements: [], + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..96047bf2b2 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-float-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createFloatAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-index.md b/docs/examples/1.4.x/server-dart/examples/databases/create-index.md new file mode 100644 index 0000000000..c16a02719e --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-index.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createIndex( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + type: 'key', + attributes: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..bc4f12f0c4 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-integer-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createIntegerAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..ef3e985a38 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-ip-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createIpAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..01f2b42f75 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-relationship-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createRelationshipAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + relatedCollectionId: '[RELATED_COLLECTION_ID]', + type: 'oneToOne', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..14f2769dbb --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-string-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createStringAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + size: 1, + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..4cf3e99a72 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create-url-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.createUrlAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/create.md b/docs/examples/1.4.x/server-dart/examples/databases/create.md new file mode 100644 index 0000000000..cbaf3b742d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/create.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.create( + databaseId: '[DATABASE_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..e9865bfe22 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/delete-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.deleteAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-dart/examples/databases/delete-collection.md new file mode 100644 index 0000000000..5886920115 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/delete-collection.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.deleteCollection( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/delete-document.md b/docs/examples/1.4.x/server-dart/examples/databases/delete-document.md new file mode 100644 index 0000000000..0d298f3b42 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/delete-document.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.deleteDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/delete-index.md b/docs/examples/1.4.x/server-dart/examples/databases/delete-index.md new file mode 100644 index 0000000000..be5b2a5c9f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/delete-index.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.deleteIndex( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/delete.md b/docs/examples/1.4.x/server-dart/examples/databases/delete.md new file mode 100644 index 0000000000..ff19beea69 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.delete( + databaseId: '[DATABASE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/get-attribute.md new file mode 100644 index 0000000000..c27ddb648c --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/get-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.getAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/get-collection.md b/docs/examples/1.4.x/server-dart/examples/databases/get-collection.md new file mode 100644 index 0000000000..359f0df829 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/get-collection.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.getCollection( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/get-document.md b/docs/examples/1.4.x/server-dart/examples/databases/get-document.md new file mode 100644 index 0000000000..2141abf4be --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/get-document.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.getDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/get-index.md b/docs/examples/1.4.x/server-dart/examples/databases/get-index.md new file mode 100644 index 0000000000..2b8a90318d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/get-index.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.getIndex( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/get.md b/docs/examples/1.4.x/server-dart/examples/databases/get.md new file mode 100644 index 0000000000..f0cc118b96 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.get( + databaseId: '[DATABASE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-dart/examples/databases/list-attributes.md new file mode 100644 index 0000000000..60ca58f3c3 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/list-attributes.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.listAttributes( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/list-collections.md b/docs/examples/1.4.x/server-dart/examples/databases/list-collections.md new file mode 100644 index 0000000000..a10038db11 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/list-collections.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.listCollections( + databaseId: '[DATABASE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/list-documents.md b/docs/examples/1.4.x/server-dart/examples/databases/list-documents.md new file mode 100644 index 0000000000..70299774fb --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/list-documents.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.listDocuments( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-dart/examples/databases/list-indexes.md new file mode 100644 index 0000000000..6703ebf35a --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/list-indexes.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.listIndexes( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/list.md b/docs/examples/1.4.x/server-dart/examples/databases/list.md new file mode 100644 index 0000000000..d9bd06ad34 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..94853d2819 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-boolean-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateBooleanAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + xdefault: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-collection.md b/docs/examples/1.4.x/server-dart/examples/databases/update-collection.md new file mode 100644 index 0000000000..a5f32dead1 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-collection.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateCollection( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..f93aa81500 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-datetime-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateDatetimeAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + xdefault: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-document.md b/docs/examples/1.4.x/server-dart/examples/databases/update-document.md new file mode 100644 index 0000000000..fb08413f2f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-document.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateDocument( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8fd104db32 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-email-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateEmailAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + xdefault: 'email@example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..20c44817ef --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-enum-attribute.md @@ -0,0 +1,28 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateEnumAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + elements: [], + xrequired: false, + xdefault: '[DEFAULT]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..50432542c6 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-float-attribute.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateFloatAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + min: 0, + max: 0, + xdefault: 0, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..2d3da6ced6 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-integer-attribute.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateIntegerAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + min: 0, + max: 0, + xdefault: 0, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..8c4cf4f3f2 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-ip-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateIpAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + xdefault: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..239e23daab --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-relationship-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateRelationshipAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..7f24507aba --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-string-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateStringAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + xdefault: '[DEFAULT]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-dart/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..d7dd6758bb --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update-url-attribute.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.updateUrlAttribute( + databaseId: '[DATABASE_ID]', + collectionId: '[COLLECTION_ID]', + key: '', + xrequired: false, + xdefault: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/databases/update.md b/docs/examples/1.4.x/server-dart/examples/databases/update.md new file mode 100644 index 0000000000..59070cefa9 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/databases/update.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Databases databases = Databases(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = databases.update( + databaseId: '[DATABASE_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/create-build.md b/docs/examples/1.4.x/server-dart/examples/functions/create-build.md new file mode 100644 index 0000000000..530ba6deab --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/create-build.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.createBuild( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + buildId: '[BUILD_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-dart/examples/functions/create-deployment.md new file mode 100644 index 0000000000..8be0f1a725 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/create-deployment.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.createDeployment( + functionId: '[FUNCTION_ID]', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.4.x/server-dart/examples/functions/create-execution.md new file mode 100644 index 0000000000..f5de49f7cf --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/create-execution.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.createExecution( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/create-variable.md b/docs/examples/1.4.x/server-dart/examples/functions/create-variable.md new file mode 100644 index 0000000000..50cd063ca1 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/create-variable.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.createVariable( + functionId: '[FUNCTION_ID]', + key: '[KEY]', + value: '[VALUE]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/create.md b/docs/examples/1.4.x/server-dart/examples/functions/create.md new file mode 100644 index 0000000000..839c6f6edd --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/create.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.create( + functionId: '[FUNCTION_ID]', + name: '[NAME]', + runtime: 'node-14.5', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-dart/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..e65380c501 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/delete-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.deleteDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-dart/examples/functions/delete-variable.md new file mode 100644 index 0000000000..87c7f407b5 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/delete-variable.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.deleteVariable( + functionId: '[FUNCTION_ID]', + variableId: '[VARIABLE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/delete.md b/docs/examples/1.4.x/server-dart/examples/functions/delete.md new file mode 100644 index 0000000000..5163366912 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.delete( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-dart/examples/functions/download-deployment.md new file mode 100644 index 0000000000..d77d3aaff8 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/download-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.downloadDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-dart/examples/functions/get-deployment.md new file mode 100644 index 0000000000..9cab571e94 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/get-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.getDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/get-execution.md b/docs/examples/1.4.x/server-dart/examples/functions/get-execution.md new file mode 100644 index 0000000000..6cadde6426 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/get-execution.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.getExecution( + functionId: '[FUNCTION_ID]', + executionId: '[EXECUTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/get-variable.md b/docs/examples/1.4.x/server-dart/examples/functions/get-variable.md new file mode 100644 index 0000000000..924bee2bff --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/get-variable.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.getVariable( + functionId: '[FUNCTION_ID]', + variableId: '[VARIABLE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/get.md b/docs/examples/1.4.x/server-dart/examples/functions/get.md new file mode 100644 index 0000000000..503ab20709 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.get( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-dart/examples/functions/list-deployments.md new file mode 100644 index 0000000000..b12f9eba87 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/list-deployments.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listDeployments( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/list-executions.md b/docs/examples/1.4.x/server-dart/examples/functions/list-executions.md new file mode 100644 index 0000000000..3d66a4496a --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/list-executions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listExecutions( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-dart/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..091a1116f7 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/list-runtimes.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listRuntimes(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/list-variables.md b/docs/examples/1.4.x/server-dart/examples/functions/list-variables.md new file mode 100644 index 0000000000..f3c6655b14 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/list-variables.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listVariables( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/list.md b/docs/examples/1.4.x/server-dart/examples/functions/list.md new file mode 100644 index 0000000000..4f2b11404d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-dart/examples/functions/update-deployment.md new file mode 100644 index 0000000000..d503aecb3b --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/update-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.updateDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/update-variable.md b/docs/examples/1.4.x/server-dart/examples/functions/update-variable.md new file mode 100644 index 0000000000..126d264470 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/update-variable.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.updateVariable( + functionId: '[FUNCTION_ID]', + variableId: '[VARIABLE_ID]', + key: '[KEY]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/functions/update.md b/docs/examples/1.4.x/server-dart/examples/functions/update.md new file mode 100644 index 0000000000..86295b4ea3 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/functions/update.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.update( + functionId: '[FUNCTION_ID]', + name: '[NAME]', + runtime: 'node-14.5', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/graphql/mutation.md b/docs/examples/1.4.x/server-dart/examples/graphql/mutation.md new file mode 100644 index 0000000000..780ee09f4a --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/graphql/mutation.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Graphql graphql = Graphql(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = graphql.mutation( + query: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/graphql/query.md b/docs/examples/1.4.x/server-dart/examples/graphql/query.md new file mode 100644 index 0000000000..7f22f5360d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/graphql/query.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Graphql graphql = Graphql(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = graphql.query( + query: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-dart/examples/health/get-antivirus.md new file mode 100644 index 0000000000..922dcfa136 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-antivirus.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getAntivirus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-cache.md b/docs/examples/1.4.x/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..4b63edeee3 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-cache.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getCache(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-d-b.md b/docs/examples/1.4.x/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..65188c096e --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-d-b.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getDB(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-dart/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..ef20bed89f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-pub-sub.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getPubSub(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..4063ab3514 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueCertificates(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..5ebaad6484 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueFunctions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..11a5285439 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueLogs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..a43f5f8423 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueWebhooks(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-queue.md b/docs/examples/1.4.x/server-dart/examples/health/get-queue.md new file mode 100644 index 0000000000..8b7c823dc7 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-queue.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueue(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..4a586690fe --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getStorageLocal(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get-time.md b/docs/examples/1.4.x/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..d8166dd3d1 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get-time.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getTime(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/health/get.md b/docs/examples/1.4.x/server-dart/examples/health/get.md new file mode 100644 index 0000000000..1be37e5a93 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/health/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/get.md b/docs/examples/1.4.x/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..9ecb18c52d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-codes.md b/docs/examples/1.4.x/server-dart/examples/locale/list-codes.md new file mode 100644 index 0000000000..abc4528cfc --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-codes.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listCodes(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-continents.md b/docs/examples/1.4.x/server-dart/examples/locale/list-continents.md new file mode 100644 index 0000000000..e6849303b1 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-continents.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listContinents(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-dart/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..2d1ddcf8f0 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-countries-e-u.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listCountriesEU(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-dart/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..2305701339 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-countries-phones.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listCountriesPhones(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-countries.md b/docs/examples/1.4.x/server-dart/examples/locale/list-countries.md new file mode 100644 index 0000000000..ef1158339f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-countries.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listCountries(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-dart/examples/locale/list-currencies.md new file mode 100644 index 0000000000..0810f3dafb --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-currencies.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listCurrencies(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/locale/list-languages.md b/docs/examples/1.4.x/server-dart/examples/locale/list-languages.md new file mode 100644 index 0000000000..f3d642cc48 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/locale/list-languages.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.listLanguages(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-dart/examples/storage/create-bucket.md new file mode 100644 index 0000000000..745a6b508d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.createBucket( + bucketId: '[BUCKET_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/create-file.md b/docs/examples/1.4.x/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..ab4c661a54 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/create-file.md @@ -0,0 +1,26 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.createFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-dart/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..de516561bd --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/delete-bucket.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.deleteBucket( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/delete-file.md b/docs/examples/1.4.x/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..8e4460bb00 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/delete-file.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.deleteFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-dart/examples/storage/get-bucket.md new file mode 100644 index 0000000000..9e39076e35 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/get-bucket.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getBucket( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..6534fe33ff --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ca16d635b2 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..5c3d69dcbc --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/get-file.md b/docs/examples/1.4.x/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..bc45c3f1e8 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/get-file.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-dart/examples/storage/list-buckets.md new file mode 100644 index 0000000000..6a35febb39 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/list-buckets.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.listBuckets( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/list-files.md b/docs/examples/1.4.x/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..40b8d3bce5 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/list-files.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.listFiles( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-dart/examples/storage/update-bucket.md new file mode 100644 index 0000000000..064d2f2e37 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.updateBucket( + bucketId: '[BUCKET_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/storage/update-file.md b/docs/examples/1.4.x/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..2fa999a558 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/storage/update-file.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.updateFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/create-membership.md b/docs/examples/1.4.x/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..6a98fea0bd --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/create.md b/docs/examples/1.4.x/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..74895b23a0 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/create.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.create( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..8c135994d6 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/delete.md b/docs/examples/1.4.x/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..a5fee4d084 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/get-membership.md b/docs/examples/1.4.x/server-dart/examples/teams/get-membership.md new file mode 100644 index 0000000000..4193b245f4 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/get-membership.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.getMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-dart/examples/teams/get-prefs.md new file mode 100644 index 0000000000..27f2ef15ad --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/get-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = teams.getPrefs( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/get.md b/docs/examples/1.4.x/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..daa67c4eb8 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-dart/examples/teams/list-memberships.md new file mode 100644 index 0000000000..74c66c0319 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/list-memberships.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.listMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/list.md b/docs/examples/1.4.x/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..11033f33da --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-dart/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..ca704e0fdb --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/update-membership-status.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = teams.updateMembershipStatus( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/update-membership.md b/docs/examples/1.4.x/server-dart/examples/teams/update-membership.md new file mode 100644 index 0000000000..85b126c13a --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/update-membership.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.updateMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + roles: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/update-name.md b/docs/examples/1.4.x/server-dart/examples/teams/update-name.md new file mode 100644 index 0000000000..088a5cfbe6 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/update-name.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.updateName( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-dart/examples/teams/update-prefs.md new file mode 100644 index 0000000000..d99e821759 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/teams/update-prefs.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = teams.updatePrefs( + teamId: '[TEAM_ID]', + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-dart/examples/users/create-argon2user.md new file mode 100644 index 0000000000..a40b3afd55 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-argon2user.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createArgon2User( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-dart/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..8b55d656b0 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-bcrypt-user.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createBcryptUser( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-dart/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..3ab8901f3c --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-m-d5user.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createMD5User( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-dart/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..bedb44f4c2 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-p-h-pass-user.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createPHPassUser( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-dart/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..361f309a37 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-s-h-a-user.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createSHAUser( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-dart/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..fa5b80519e --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,28 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createScryptModifiedUser( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + passwordSalt: '[PASSWORD_SALT]', + passwordSaltSeparator: '[PASSWORD_SALT_SEPARATOR]', + passwordSignerKey: '[PASSWORD_SIGNER_KEY]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-dart/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..91e1f7dc6d --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create-scrypt-user.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.createScryptUser( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + passwordSalt: '[PASSWORD_SALT]', + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/create.md b/docs/examples/1.4.x/server-dart/examples/users/create.md new file mode 100644 index 0000000000..517cd22fcb --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/create.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.create( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/delete-identity.md b/docs/examples/1.4.x/server-dart/examples/users/delete-identity.md new file mode 100644 index 0000000000..4bcfd6d421 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/delete-identity.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteIdentity( + identityId: '[IDENTITY_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/delete-session.md b/docs/examples/1.4.x/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..3f7611873e --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/delete-session.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSession( + userId: '[USER_ID]', + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..69cbc5e8d5 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/delete.md b/docs/examples/1.4.x/server-dart/examples/users/delete.md new file mode 100644 index 0000000000..1e1311d5d9 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.delete( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/get-prefs.md b/docs/examples/1.4.x/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..eb33ae656c --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/get-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getPrefs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/get.md b/docs/examples/1.4.x/server-dart/examples/users/get.md new file mode 100644 index 0000000000..c56852934c --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.get( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/list-identities.md b/docs/examples/1.4.x/server-dart/examples/users/list-identities.md new file mode 100644 index 0000000000..b19fed01fe --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/list-identities.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.listIdentities( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/list-logs.md b/docs/examples/1.4.x/server-dart/examples/users/list-logs.md new file mode 100644 index 0000000000..0d2143ad48 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/list-logs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.listLogs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/list-memberships.md b/docs/examples/1.4.x/server-dart/examples/users/list-memberships.md new file mode 100644 index 0000000000..36a83edec0 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/list-memberships.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.listMemberships( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/list-sessions.md b/docs/examples/1.4.x/server-dart/examples/users/list-sessions.md new file mode 100644 index 0000000000..5f77fdbfa7 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/list-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.listSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/list.md b/docs/examples/1.4.x/server-dart/examples/users/list.md new file mode 100644 index 0000000000..34498c00ac --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-dart/examples/users/update-email-verification.md new file mode 100644 index 0000000000..8853f86529 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-email-verification.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateEmailVerification( + userId: '[USER_ID]', + emailVerification: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-email.md b/docs/examples/1.4.x/server-dart/examples/users/update-email.md new file mode 100644 index 0000000000..8813e1101f --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-email.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateEmail( + userId: '[USER_ID]', + email: 'email@example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-labels.md b/docs/examples/1.4.x/server-dart/examples/users/update-labels.md new file mode 100644 index 0000000000..ecd06e7699 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-labels.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateLabels( + userId: '[USER_ID]', + labels: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-name.md b/docs/examples/1.4.x/server-dart/examples/users/update-name.md new file mode 100644 index 0000000000..56797d585c --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-name.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateName( + userId: '[USER_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-password.md b/docs/examples/1.4.x/server-dart/examples/users/update-password.md new file mode 100644 index 0000000000..3dfedb4d4b --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-password.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePassword( + userId: '[USER_ID]', + password: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-dart/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..37c3ced608 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-phone-verification.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePhoneVerification( + userId: '[USER_ID]', + phoneVerification: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-phone.md b/docs/examples/1.4.x/server-dart/examples/users/update-phone.md new file mode 100644 index 0000000000..4d5e311078 --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-phone.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePhone( + userId: '[USER_ID]', + number: '+12065550100', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-prefs.md b/docs/examples/1.4.x/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..c6c1bbedff --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-prefs.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePrefs( + userId: '[USER_ID]', + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dart/examples/users/update-status.md b/docs/examples/1.4.x/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..6f80745a7a --- /dev/null +++ b/docs/examples/1.4.x/server-dart/examples/users/update-status.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateStatus( + userId: '[USER_ID]', + status: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-deno/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..fe765887cc --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/create-phone-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.createPhoneVerification(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/create-recovery.md b/docs/examples/1.4.x/server-deno/examples/account/create-recovery.md new file mode 100644 index 0000000000..e5adb2a78b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/create-recovery.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/create-verification.md b/docs/examples/1.4.x/server-deno/examples/account/create-verification.md new file mode 100644 index 0000000000..5861278e70 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/create-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/delete-identity.md b/docs/examples/1.4.x/server-deno/examples/account/delete-identity.md new file mode 100644 index 0000000000..f24954e2b6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/delete-identity.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/delete-session.md b/docs/examples/1.4.x/server-deno/examples/account/delete-session.md new file mode 100644 index 0000000000..22417acb98 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/delete-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-deno/examples/account/delete-sessions.md new file mode 100644 index 0000000000..2a82bd9566 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/delete-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.deleteSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/get-prefs.md b/docs/examples/1.4.x/server-deno/examples/account/get-prefs.md new file mode 100644 index 0000000000..c9645d0fe1 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/get-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.getPrefs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/get-session.md b/docs/examples/1.4.x/server-deno/examples/account/get-session.md new file mode 100644 index 0000000000..f2c1c94469 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/get-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/get.md b/docs/examples/1.4.x/server-deno/examples/account/get.md new file mode 100644 index 0000000000..03b22307ac --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/list-identities.md b/docs/examples/1.4.x/server-deno/examples/account/list-identities.md new file mode 100644 index 0000000000..c3faa7b5b3 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/list-identities.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.listIdentities(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/list-logs.md b/docs/examples/1.4.x/server-deno/examples/account/list-logs.md new file mode 100644 index 0000000000..fb79304101 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/list-logs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.listLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/list-sessions.md b/docs/examples/1.4.x/server-deno/examples/account/list-sessions.md new file mode 100644 index 0000000000..32a7cfa09a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/list-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.listSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-email.md b/docs/examples/1.4.x/server-deno/examples/account/update-email.md new file mode 100644 index 0000000000..26906d7eed --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-email.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-name.md b/docs/examples/1.4.x/server-deno/examples/account/update-name.md new file mode 100644 index 0000000000..b1a351216f --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-name.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-password.md b/docs/examples/1.4.x/server-deno/examples/account/update-password.md new file mode 100644 index 0000000000..a271dfe7e6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-password.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updatePassword(''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-deno/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..064252a328 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-phone-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-phone.md b/docs/examples/1.4.x/server-deno/examples/account/update-phone.md new file mode 100644 index 0000000000..e023424f9e --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-phone.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updatePhone('+12065550100', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-prefs.md b/docs/examples/1.4.x/server-deno/examples/account/update-prefs.md new file mode 100644 index 0000000000..4a6ca88ae8 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-recovery.md b/docs/examples/1.4.x/server-deno/examples/account/update-recovery.md new file mode 100644 index 0000000000..06916bb278 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-recovery.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-session.md b/docs/examples/1.4.x/server-deno/examples/account/update-session.md new file mode 100644 index 0000000000..23a7ad2cf6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-status.md b/docs/examples/1.4.x/server-deno/examples/account/update-status.md new file mode 100644 index 0000000000..6b9b18981b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-status.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateStatus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/account/update-verification.md b/docs/examples/1.4.x/server-deno/examples/account/update-verification.md new file mode 100644 index 0000000000..c11f2b71c1 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/account/update-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-browser.md new file mode 100644 index 0000000000..44c946e4d7 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-browser.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getBrowser('aa'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..0f44982738 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-credit-card.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getCreditCard('amex'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..f0a539b5fc --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-favicon.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getFavicon('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-flag.md new file mode 100644 index 0000000000..c7593aee1e --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-flag.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getFlag('af'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-image.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-image.md new file mode 100644 index 0000000000..6e86307a5f --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-image.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getImage('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2adba9e971 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-initials.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getInitials(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-deno/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..2c5faf0112 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/avatars/get-q-r.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getQR('[TEXT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..81b66771ff --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-boolean-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-collection.md b/docs/examples/1.4.x/server-deno/examples/databases/create-collection.md new file mode 100644 index 0000000000..5d59286e3c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..c2c4eb8185 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-datetime-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-document.md b/docs/examples/1.4.x/server-deno/examples/databases/create-document.md new file mode 100644 index 0000000000..d38818c164 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..4952625bfc --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-email-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d00274d616 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-enum-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..c2b056fd1b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-index.md b/docs/examples/1.4.x/server-deno/examples/databases/create-index.md new file mode 100644 index 0000000000..bfde8e3fb5 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-index.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createIndex('[DATABASE_ID]', '[COLLECTION_ID]', '', 'key', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..2a36f413e5 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..19180d6ac0 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-ip-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..e613a6f596 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '[RELATED_COLLECTION_ID]', 'oneToOne'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..f3b0a36923 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', 1, false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..488751adff --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create-url-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.createUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/create.md b/docs/examples/1.4.x/server-deno/examples/databases/create.md new file mode 100644 index 0000000000..ea1ebb6460 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.create('[DATABASE_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..e6fe0823f2 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/delete-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.deleteAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-deno/examples/databases/delete-collection.md new file mode 100644 index 0000000000..970602ac28 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/delete-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.deleteCollection('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/delete-document.md b/docs/examples/1.4.x/server-deno/examples/databases/delete-document.md new file mode 100644 index 0000000000..1a23e03e27 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/delete-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.deleteDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/delete-index.md b/docs/examples/1.4.x/server-deno/examples/databases/delete-index.md new file mode 100644 index 0000000000..8a6050522a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/delete-index.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.deleteIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/delete.md b/docs/examples/1.4.x/server-deno/examples/databases/delete.md new file mode 100644 index 0000000000..b735eccdbe --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.delete('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/get-attribute.md new file mode 100644 index 0000000000..1ec9957b5e --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/get-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.getAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/get-collection.md b/docs/examples/1.4.x/server-deno/examples/databases/get-collection.md new file mode 100644 index 0000000000..bf471e3b36 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/get-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.getCollection('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/get-document.md b/docs/examples/1.4.x/server-deno/examples/databases/get-document.md new file mode 100644 index 0000000000..a7248d0641 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/get-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.getDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/get-index.md b/docs/examples/1.4.x/server-deno/examples/databases/get-index.md new file mode 100644 index 0000000000..c1fe00cb65 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/get-index.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.getIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/get.md b/docs/examples/1.4.x/server-deno/examples/databases/get.md new file mode 100644 index 0000000000..46df3aad22 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.get('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-deno/examples/databases/list-attributes.md new file mode 100644 index 0000000000..f2b21141b3 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/list-attributes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.listAttributes('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/list-collections.md b/docs/examples/1.4.x/server-deno/examples/databases/list-collections.md new file mode 100644 index 0000000000..83e4ee951f --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/list-collections.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.listCollections('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/list-documents.md b/docs/examples/1.4.x/server-deno/examples/databases/list-documents.md new file mode 100644 index 0000000000..c7db17efb5 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/list-documents.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.listDocuments('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-deno/examples/databases/list-indexes.md new file mode 100644 index 0000000000..69c412b99d --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/list-indexes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.listIndexes('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/list.md b/docs/examples/1.4.x/server-deno/examples/databases/list.md new file mode 100644 index 0000000000..8bb75110ec --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..c8b55b77e5 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-boolean-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-collection.md b/docs/examples/1.4.x/server-deno/examples/databases/update-collection.md new file mode 100644 index 0000000000..f81f46e7f4 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..25549b4ed2 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-datetime-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-document.md b/docs/examples/1.4.x/server-deno/examples/databases/update-document.md new file mode 100644 index 0000000000..9964fdb6eb --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..78d2403cd8 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-email-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'email@example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..f47b96fc53 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-enum-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false, '[DEFAULT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..62df38cddc --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..001671eda1 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..8ee0d5c80a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-ip-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..c12a64a9dc --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-relationship-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..ab77495e23 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-string-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '[DEFAULT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-deno/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..c9ab818c80 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update-url-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.updateUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/databases/update.md b/docs/examples/1.4.x/server-deno/examples/databases/update.md new file mode 100644 index 0000000000..64886a697b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/databases/update.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = databases.update('[DATABASE_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/create-build.md b/docs/examples/1.4.x/server-deno/examples/functions/create-build.md new file mode 100644 index 0000000000..28d10105e3 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/create-build.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.createBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-deno/examples/functions/create-deployment.md new file mode 100644 index 0000000000..167d177bb7 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/create-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.createDeployment('[FUNCTION_ID]', InputFile.fromPath('/path/to/file.png', 'file.png'), false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.4.x/server-deno/examples/functions/create-execution.md new file mode 100644 index 0000000000..6ec920ef9d --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/create-variable.md b/docs/examples/1.4.x/server-deno/examples/functions/create-variable.md new file mode 100644 index 0000000000..375ef8b7a6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/create-variable.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.createVariable('[FUNCTION_ID]', '[KEY]', '[VALUE]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/create.md b/docs/examples/1.4.x/server-deno/examples/functions/create.md new file mode 100644 index 0000000000..0c5ff2ce5f --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-deno/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..7b6468bb06 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/delete-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-deno/examples/functions/delete-variable.md new file mode 100644 index 0000000000..16bf385a4c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/delete-variable.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.deleteVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/delete.md b/docs/examples/1.4.x/server-deno/examples/functions/delete.md new file mode 100644 index 0000000000..48ec374bf2 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-deno/examples/functions/download-deployment.md new file mode 100644 index 0000000000..dc07358df1 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/download-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.downloadDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-deno/examples/functions/get-deployment.md new file mode 100644 index 0000000000..854f3897d9 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/get-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/get-execution.md b/docs/examples/1.4.x/server-deno/examples/functions/get-execution.md new file mode 100644 index 0000000000..42bcdfbfdf --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/get-execution.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/get-variable.md b/docs/examples/1.4.x/server-deno/examples/functions/get-variable.md new file mode 100644 index 0000000000..2b4190e0a6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/get-variable.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.getVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/get.md b/docs/examples/1.4.x/server-deno/examples/functions/get.md new file mode 100644 index 0000000000..388958232a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-deno/examples/functions/list-deployments.md new file mode 100644 index 0000000000..e84bb9cc09 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/list-deployments.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listDeployments('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/list-executions.md b/docs/examples/1.4.x/server-deno/examples/functions/list-executions.md new file mode 100644 index 0000000000..aadd19f1ce --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/list-executions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-deno/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..6fc7570b3a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/list-runtimes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listRuntimes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/list-variables.md b/docs/examples/1.4.x/server-deno/examples/functions/list-variables.md new file mode 100644 index 0000000000..44a9828a67 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/list-variables.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listVariables('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/list.md b/docs/examples/1.4.x/server-deno/examples/functions/list.md new file mode 100644 index 0000000000..7c82760a39 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-deno/examples/functions/update-deployment.md new file mode 100644 index 0000000000..94be560a2d --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/update-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/update-variable.md b/docs/examples/1.4.x/server-deno/examples/functions/update-variable.md new file mode 100644 index 0000000000..1a318f1eba --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/update-variable.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.updateVariable('[FUNCTION_ID]', '[VARIABLE_ID]', '[KEY]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/functions/update.md b/docs/examples/1.4.x/server-deno/examples/functions/update.md new file mode 100644 index 0000000000..360e7abb05 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/functions/update.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/graphql/mutation.md b/docs/examples/1.4.x/server-deno/examples/graphql/mutation.md new file mode 100644 index 0000000000..87beeabce6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/graphql/mutation.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let graphql = new sdk.Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = graphql.mutation({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/graphql/query.md b/docs/examples/1.4.x/server-deno/examples/graphql/query.md new file mode 100644 index 0000000000..d2eec0a8db --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/graphql/query.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let graphql = new sdk.Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = graphql.query({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-deno/examples/health/get-antivirus.md new file mode 100644 index 0000000000..8d51808536 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-antivirus.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getAntivirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-cache.md b/docs/examples/1.4.x/server-deno/examples/health/get-cache.md new file mode 100644 index 0000000000..cafc3018c0 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-cache.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getCache(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-d-b.md b/docs/examples/1.4.x/server-deno/examples/health/get-d-b.md new file mode 100644 index 0000000000..a000535051 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-d-b.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getDB(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-deno/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..979ef0b51c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-pub-sub.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getPubSub(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-deno/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..49dab6b2e6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-queue-certificates.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-deno/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..74f458b9fe --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-queue-functions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-deno/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..98948b9de6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-queue-logs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-deno/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..7b45c189cc --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-queue-webhooks.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-queue.md b/docs/examples/1.4.x/server-deno/examples/health/get-queue.md new file mode 100644 index 0000000000..4c1f675bb6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-queue.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueue(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-deno/examples/health/get-storage-local.md new file mode 100644 index 0000000000..4c45d89aca --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-storage-local.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get-time.md b/docs/examples/1.4.x/server-deno/examples/health/get-time.md new file mode 100644 index 0000000000..6a66a10a05 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get-time.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getTime(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/health/get.md b/docs/examples/1.4.x/server-deno/examples/health/get.md new file mode 100644 index 0000000000..0b9af9dd15 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/health/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/get.md b/docs/examples/1.4.x/server-deno/examples/locale/get.md new file mode 100644 index 0000000000..22b9a62655 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-codes.md b/docs/examples/1.4.x/server-deno/examples/locale/list-codes.md new file mode 100644 index 0000000000..1ca38d4e88 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-codes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listCodes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-continents.md b/docs/examples/1.4.x/server-deno/examples/locale/list-continents.md new file mode 100644 index 0000000000..bd69f43a61 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-continents.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listContinents(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-deno/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..3d3b7b492a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-countries-e-u.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listCountriesEU(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-deno/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..bc9e1754ad --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-countries-phones.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listCountriesPhones(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-countries.md b/docs/examples/1.4.x/server-deno/examples/locale/list-countries.md new file mode 100644 index 0000000000..0790270371 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-countries.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listCountries(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-deno/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e040312fef --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-currencies.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listCurrencies(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/locale/list-languages.md b/docs/examples/1.4.x/server-deno/examples/locale/list-languages.md new file mode 100644 index 0000000000..be5af4d50c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/locale/list-languages.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.listLanguages(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-deno/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a25211a1c7 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.createBucket('[BUCKET_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/create-file.md b/docs/examples/1.4.x/server-deno/examples/storage/create-file.md new file mode 100644 index 0000000000..c0fe4930b9 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/create-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', InputFile.fromPath('/path/to/file.png', 'file.png')); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-deno/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..d468428141 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/delete-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.deleteBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/delete-file.md b/docs/examples/1.4.x/server-deno/examples/storage/delete-file.md new file mode 100644 index 0000000000..e86da1763b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/delete-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-deno/examples/storage/get-bucket.md new file mode 100644 index 0000000000..35d22b941a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/get-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-deno/examples/storage/get-file-download.md new file mode 100644 index 0000000000..206b860e25 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/get-file-download.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-deno/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..4815c6b40b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/get-file-preview.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-deno/examples/storage/get-file-view.md new file mode 100644 index 0000000000..11ca8fdc6c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/get-file-view.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/get-file.md b/docs/examples/1.4.x/server-deno/examples/storage/get-file.md new file mode 100644 index 0000000000..04aa43a5b1 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/get-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-deno/examples/storage/list-buckets.md new file mode 100644 index 0000000000..0c31feffe3 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/list-buckets.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.listBuckets(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/list-files.md b/docs/examples/1.4.x/server-deno/examples/storage/list-files.md new file mode 100644 index 0000000000..00178aa874 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/list-files.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-deno/examples/storage/update-bucket.md new file mode 100644 index 0000000000..aca746145e --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.updateBucket('[BUCKET_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/storage/update-file.md b/docs/examples/1.4.x/server-deno/examples/storage/update-file.md new file mode 100644 index 0000000000..79f31c3b03 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/storage/update-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/create-membership.md b/docs/examples/1.4.x/server-deno/examples/teams/create-membership.md new file mode 100644 index 0000000000..c4169a306b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/create.md b/docs/examples/1.4.x/server-deno/examples/teams/create.md new file mode 100644 index 0000000000..8272adb4d0 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-deno/examples/teams/delete-membership.md new file mode 100644 index 0000000000..402deb0b8a --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/delete-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/delete.md b/docs/examples/1.4.x/server-deno/examples/teams/delete.md new file mode 100644 index 0000000000..3b30934bea --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/get-membership.md b/docs/examples/1.4.x/server-deno/examples/teams/get-membership.md new file mode 100644 index 0000000000..7d50599b67 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/get-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-deno/examples/teams/get-prefs.md new file mode 100644 index 0000000000..5a7fa4d98f --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/get-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = teams.getPrefs('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/get.md b/docs/examples/1.4.x/server-deno/examples/teams/get.md new file mode 100644 index 0000000000..44ecdab949 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-deno/examples/teams/list-memberships.md new file mode 100644 index 0000000000..7d730021a6 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/list-memberships.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.listMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/list.md b/docs/examples/1.4.x/server-deno/examples/teams/list.md new file mode 100644 index 0000000000..c45ffdc066 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-deno/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..7bb57d8974 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/update-membership-status.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/update-membership.md b/docs/examples/1.4.x/server-deno/examples/teams/update-membership.md new file mode 100644 index 0000000000..3ada2f4745 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.updateMembership('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/update-name.md b/docs/examples/1.4.x/server-deno/examples/teams/update-name.md new file mode 100644 index 0000000000..47c3fc2765 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/update-name.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.updateName('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-deno/examples/teams/update-prefs.md new file mode 100644 index 0000000000..83845be036 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/teams/update-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = teams.updatePrefs('[TEAM_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-deno/examples/users/create-argon2user.md new file mode 100644 index 0000000000..e55b644b62 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-argon2user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createArgon2User('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-deno/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..325fbe46d5 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-bcrypt-user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createBcryptUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-deno/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..8892688594 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-m-d5user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createMD5User('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-deno/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..d7a3428fd5 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-p-h-pass-user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createPHPassUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-deno/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..c3ade982ef --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-s-h-a-user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createSHAUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-deno/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..8039a970c2 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createScryptModifiedUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', '[PASSWORD_SALT_SEPARATOR]', '[PASSWORD_SIGNER_KEY]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-deno/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..9889855e7c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.createScryptUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', null, null, null, null); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/create.md b/docs/examples/1.4.x/server-deno/examples/users/create.md new file mode 100644 index 0000000000..c56f8d8f88 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.create('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/delete-identity.md b/docs/examples/1.4.x/server-deno/examples/users/delete-identity.md new file mode 100644 index 0000000000..7d7b88a7f9 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/delete-identity.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/delete-session.md b/docs/examples/1.4.x/server-deno/examples/users/delete-session.md new file mode 100644 index 0000000000..e4ea45ba73 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/delete-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-deno/examples/users/delete-sessions.md new file mode 100644 index 0000000000..0e12d6dacf --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/delete-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/delete.md b/docs/examples/1.4.x/server-deno/examples/users/delete.md new file mode 100644 index 0000000000..f0223024a3 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.delete('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/get-prefs.md b/docs/examples/1.4.x/server-deno/examples/users/get-prefs.md new file mode 100644 index 0000000000..63953f9d24 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/get-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/get.md b/docs/examples/1.4.x/server-deno/examples/users/get.md new file mode 100644 index 0000000000..c9300c5060 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/list-identities.md b/docs/examples/1.4.x/server-deno/examples/users/list-identities.md new file mode 100644 index 0000000000..687770178c --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/list-identities.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.listIdentities(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/list-logs.md b/docs/examples/1.4.x/server-deno/examples/users/list-logs.md new file mode 100644 index 0000000000..7d0841fc77 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/list-logs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.listLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/list-memberships.md b/docs/examples/1.4.x/server-deno/examples/users/list-memberships.md new file mode 100644 index 0000000000..74f2fb7f1e --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/list-memberships.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.listMemberships('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/list-sessions.md b/docs/examples/1.4.x/server-deno/examples/users/list-sessions.md new file mode 100644 index 0000000000..1aa4ca7d78 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/list-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.listSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/list.md b/docs/examples/1.4.x/server-deno/examples/users/list.md new file mode 100644 index 0000000000..369ccd7b29 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-deno/examples/users/update-email-verification.md new file mode 100644 index 0000000000..146cea5027 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-email-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateEmailVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-email.md b/docs/examples/1.4.x/server-deno/examples/users/update-email.md new file mode 100644 index 0000000000..bd7f0ffbd8 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-email.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateEmail('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-labels.md b/docs/examples/1.4.x/server-deno/examples/users/update-labels.md new file mode 100644 index 0000000000..73aee6485b --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-labels.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateLabels('[USER_ID]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-name.md b/docs/examples/1.4.x/server-deno/examples/users/update-name.md new file mode 100644 index 0000000000..071c948201 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-name.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateName('[USER_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-password.md b/docs/examples/1.4.x/server-deno/examples/users/update-password.md new file mode 100644 index 0000000000..e6ae8b725e --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-password.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePassword('[USER_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-deno/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..293f876152 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-phone-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePhoneVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-phone.md b/docs/examples/1.4.x/server-deno/examples/users/update-phone.md new file mode 100644 index 0000000000..e634f59719 --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-phone.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePhone('[USER_ID]', '+12065550100'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-prefs.md b/docs/examples/1.4.x/server-deno/examples/users/update-prefs.md new file mode 100644 index 0000000000..248fdb10ab --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-deno/examples/users/update-status.md b/docs/examples/1.4.x/server-deno/examples/users/update-status.md new file mode 100644 index 0000000000..2f142596fd --- /dev/null +++ b/docs/examples/1.4.x/server-deno/examples/users/update-status.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateStatus('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-dotnet/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..570bb20f5e --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.CreatePhoneVerification(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/create-recovery.md b/docs/examples/1.4.x/server-dotnet/examples/account/create-recovery.md new file mode 100644 index 0000000000..1edc79bc50 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.CreateRecovery( + email: "email@example.com", + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/create-verification.md b/docs/examples/1.4.x/server-dotnet/examples/account/create-verification.md new file mode 100644 index 0000000000..928fcb8561 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/create-verification.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.CreateVerification( + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/delete-identity.md b/docs/examples/1.4.x/server-dotnet/examples/account/delete-identity.md new file mode 100644 index 0000000000..c5ff987822 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +await account.DeleteIdentity( + identityId: "[IDENTITY_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/delete-session.md b/docs/examples/1.4.x/server-dotnet/examples/account/delete-session.md new file mode 100644 index 0000000000..c880a4f88d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/delete-session.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +await account.DeleteSession( + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-dotnet/examples/account/delete-sessions.md new file mode 100644 index 0000000000..8dcefaf71c --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +await account.DeleteSessions(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/get-prefs.md b/docs/examples/1.4.x/server-dotnet/examples/account/get-prefs.md new file mode 100644 index 0000000000..ce3ecc1179 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Preferences result = await account.GetPrefs(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/get-session.md b/docs/examples/1.4.x/server-dotnet/examples/account/get-session.md new file mode 100644 index 0000000000..9560b6a78a --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/get-session.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Session result = await account.GetSession( + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/get.md b/docs/examples/1.4.x/server-dotnet/examples/account/get.md new file mode 100644 index 0000000000..5a50299c73 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.Get(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/list-identities.md b/docs/examples/1.4.x/server-dotnet/examples/account/list-identities.md new file mode 100644 index 0000000000..3a25342e5d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/list-identities.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +IdentityList result = await account.ListIdentities(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/list-logs.md b/docs/examples/1.4.x/server-dotnet/examples/account/list-logs.md new file mode 100644 index 0000000000..03b50407f5 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/list-logs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +LogList result = await account.ListLogs(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/list-sessions.md b/docs/examples/1.4.x/server-dotnet/examples/account/list-sessions.md new file mode 100644 index 0000000000..aa813bc1dd --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +SessionList result = await account.ListSessions(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-email.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-email.md new file mode 100644 index 0000000000..0b457e0abb --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-email.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdateEmail( + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-name.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-name.md new file mode 100644 index 0000000000..b41ba37289 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-name.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdateName( + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-password.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-password.md new file mode 100644 index 0000000000..d8bab0b4d2 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-password.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdatePassword( + password: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..6914e7805f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.UpdatePhoneVerification( + userId: "[USER_ID]", + secret: "[SECRET]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-phone.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-phone.md new file mode 100644 index 0000000000..f3e2f14df7 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-phone.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdatePhone( + phone: "+12065550100", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-prefs.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-prefs.md new file mode 100644 index 0000000000..7a4f2378e4 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdatePrefs( + prefs: [object]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-recovery.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-recovery.md new file mode 100644 index 0000000000..d26f4ab8da --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.UpdateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-session.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-session.md new file mode 100644 index 0000000000..f3365bb96b --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-session.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Session result = await account.UpdateSession( + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-status.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-status.md new file mode 100644 index 0000000000..c5e3e2c576 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-status.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdateStatus(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/account/update-verification.md b/docs/examples/1.4.x/server-dotnet/examples/account/update-verification.md new file mode 100644 index 0000000000..697d2dffa4 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/account/update-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.UpdateVerification( + userId: "[USER_ID]", + secret: "[SECRET]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..3ac58f8b47 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetBrowser( + code: "aa"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..89f36fe35d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetCreditCard( + code: "amex"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..dbabf05d57 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetFavicon( + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..fc20581c1c --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetFlag( + code: "af"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-image.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..35bf382f12 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetImage( + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..20ea37a3a4 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetInitials(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..33dcac6f91 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetQR( + text: "[TEXT]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..439537a9cb --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeBoolean result = await databases.CreateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-collection.md new file mode 100644 index 0000000000..1b7aa198a6 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Collection result = await databases.CreateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..1fff2965ff --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeDatetime result = await databases.CreateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-document.md new file mode 100644 index 0000000000..c0081f1f20 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-document.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Document result = await databases.CreateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: [object]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..e22ed7ddca --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-email-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEmail result = await databases.CreateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..773d41e9fa --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-enum-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEnum result = await databases.CreateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: new List {}, + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..d0915184e8 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-float-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeFloat result = await databases.CreateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-index.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-index.md new file mode 100644 index 0000000000..b13de722aa --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-index.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Index result = await databases.CreateIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + type: "key", + attributes: new List {}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..0d84ea7868 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeInteger result = await databases.CreateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..ca571d00bd --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeIp result = await databases.CreateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..9c4a8c3604 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-relationship-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeRelationship result = await databases.CreateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + relatedCollectionId: "[RELATED_COLLECTION_ID]", + type: "oneToOne"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..645492eeab --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-string-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeString result = await databases.CreateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + size: 1, + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..9425882dec --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create-url-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeUrl result = await databases.CreateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/create.md b/docs/examples/1.4.x/server-dotnet/examples/databases/create.md new file mode 100644 index 0000000000..61ba46c03a --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/create.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Database result = await databases.Create( + databaseId: "[DATABASE_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8ebde257c5 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-collection.md new file mode 100644 index 0000000000..398185c509 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/delete-document.md b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-document.md new file mode 100644 index 0000000000..6892b25438 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/delete-index.md b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-index.md new file mode 100644 index 0000000000..c5dab69e0f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/delete.md b/docs/examples/1.4.x/server-dotnet/examples/databases/delete.md new file mode 100644 index 0000000000..cc8b4317e1 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.Delete( + databaseId: "[DATABASE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/get-attribute.md new file mode 100644 index 0000000000..13eae946e9 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + + result = await databases.GetAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/get-collection.md b/docs/examples/1.4.x/server-dotnet/examples/databases/get-collection.md new file mode 100644 index 0000000000..b617da7810 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Collection result = await databases.GetCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/get-document.md b/docs/examples/1.4.x/server-dotnet/examples/databases/get-document.md new file mode 100644 index 0000000000..079f93a403 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/get-document.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Document result = await databases.GetDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/get-index.md b/docs/examples/1.4.x/server-dotnet/examples/databases/get-index.md new file mode 100644 index 0000000000..d989ed4651 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/get-index.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Index result = await databases.GetIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/get.md b/docs/examples/1.4.x/server-dotnet/examples/databases/get.md new file mode 100644 index 0000000000..5dfa70eec1 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Database result = await databases.Get( + databaseId: "[DATABASE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-dotnet/examples/databases/list-attributes.md new file mode 100644 index 0000000000..8af529df41 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeList result = await databases.ListAttributes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/list-collections.md b/docs/examples/1.4.x/server-dotnet/examples/databases/list-collections.md new file mode 100644 index 0000000000..ed0d7bb56f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/list-collections.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +CollectionList result = await databases.ListCollections( + databaseId: "[DATABASE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/list-documents.md b/docs/examples/1.4.x/server-dotnet/examples/databases/list-documents.md new file mode 100644 index 0000000000..92895692f0 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +DocumentList result = await databases.ListDocuments( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-dotnet/examples/databases/list-indexes.md new file mode 100644 index 0000000000..dbbed3ca53 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +IndexList result = await databases.ListIndexes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/list.md b/docs/examples/1.4.x/server-dotnet/examples/databases/list.md new file mode 100644 index 0000000000..ec234ddbab --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +DatabaseList result = await databases.List(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..2d6fa80849 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeBoolean result = await databases.UpdateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-collection.md new file mode 100644 index 0000000000..aa477e4ce0 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Collection result = await databases.UpdateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..81966f05f1 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeDatetime result = await databases.UpdateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-document.md new file mode 100644 index 0000000000..b19d9226c6 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-document.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Document result = await databases.UpdateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..5baf67fd72 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEmail result = await databases.UpdateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "email@example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..184ac1820f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEnum result = await databases.UpdateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: new List {}, + required: false, + default: "[DEFAULT]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..d68815ab07 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeFloat result = await databases.UpdateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + min: 0, + max: 0, + default: 0); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..2ad0e05754 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeInteger result = await databases.UpdateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + min: 0, + max: 0, + default: 0); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..10fd34b306 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeIp result = await databases.UpdateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..8a65da0a42 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeRelationship result = await databases.UpdateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..84fc2b8da9 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-string-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeString result = await databases.UpdateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "[DEFAULT]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..e79812a77b --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeUrl result = await databases.UpdateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/databases/update.md b/docs/examples/1.4.x/server-dotnet/examples/databases/update.md new file mode 100644 index 0000000000..743108fc66 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/databases/update.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Database result = await databases.Update( + databaseId: "[DATABASE_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/create-build.md b/docs/examples/1.4.x/server-dotnet/examples/functions/create-build.md new file mode 100644 index 0000000000..71eb842c6c --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/create-build.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + + result = await functions.CreateBuild( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]", + buildId: "[BUILD_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-dotnet/examples/functions/create-deployment.md new file mode 100644 index 0000000000..9bbcc65dea --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/create-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Deployment result = await functions.CreateDeployment( + functionId: "[FUNCTION_ID]", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.4.x/server-dotnet/examples/functions/create-execution.md new file mode 100644 index 0000000000..93cd65be5d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/create-execution.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Execution result = await functions.CreateExecution( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/create-variable.md b/docs/examples/1.4.x/server-dotnet/examples/functions/create-variable.md new file mode 100644 index 0000000000..0724bc6eef --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Variable result = await functions.CreateVariable( + functionId: "[FUNCTION_ID]", + key: "[KEY]", + value: "[VALUE]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/create.md b/docs/examples/1.4.x/server-dotnet/examples/functions/create.md new file mode 100644 index 0000000000..75c9b242f6 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/create.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.Create( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-dotnet/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2c17dfae9f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +await functions.DeleteDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-dotnet/examples/functions/delete-variable.md new file mode 100644 index 0000000000..cf201480fa --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +await functions.DeleteVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/delete.md b/docs/examples/1.4.x/server-dotnet/examples/functions/delete.md new file mode 100644 index 0000000000..123e307c79 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +await functions.Delete( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-dotnet/examples/functions/download-deployment.md new file mode 100644 index 0000000000..d167c7ddfd --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/download-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +byte[] result = await functions.DownloadDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-dotnet/examples/functions/get-deployment.md new file mode 100644 index 0000000000..7d895c6d82 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Deployment result = await functions.GetDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/get-execution.md b/docs/examples/1.4.x/server-dotnet/examples/functions/get-execution.md new file mode 100644 index 0000000000..ed65d26bef --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Execution result = await functions.GetExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/get-variable.md b/docs/examples/1.4.x/server-dotnet/examples/functions/get-variable.md new file mode 100644 index 0000000000..12083e5acb --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Variable result = await functions.GetVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/get.md b/docs/examples/1.4.x/server-dotnet/examples/functions/get.md new file mode 100644 index 0000000000..1914ccf7ac --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.Get( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-dotnet/examples/functions/list-deployments.md new file mode 100644 index 0000000000..cd6a7b9446 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/list-deployments.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +DeploymentList result = await functions.ListDeployments( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/list-executions.md b/docs/examples/1.4.x/server-dotnet/examples/functions/list-executions.md new file mode 100644 index 0000000000..d4c73a0d36 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +ExecutionList result = await functions.ListExecutions( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-dotnet/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..ca1d125eb2 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +RuntimeList result = await functions.ListRuntimes(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/list-variables.md b/docs/examples/1.4.x/server-dotnet/examples/functions/list-variables.md new file mode 100644 index 0000000000..31177df9ff --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +VariableList result = await functions.ListVariables( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/list.md b/docs/examples/1.4.x/server-dotnet/examples/functions/list.md new file mode 100644 index 0000000000..1b8897b76f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +FunctionList result = await functions.List(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-dotnet/examples/functions/update-deployment.md new file mode 100644 index 0000000000..8cd7fc5425 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.UpdateDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/update-variable.md b/docs/examples/1.4.x/server-dotnet/examples/functions/update-variable.md new file mode 100644 index 0000000000..63eac46609 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/update-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Variable result = await functions.UpdateVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]", + key: "[KEY]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/functions/update.md b/docs/examples/1.4.x/server-dotnet/examples/functions/update.md new file mode 100644 index 0000000000..1192ceb7df --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/functions/update.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.Update( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/graphql/mutation.md b/docs/examples/1.4.x/server-dotnet/examples/graphql/mutation.md new file mode 100644 index 0000000000..8ab5f0e458 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var graphql = new Graphql(client); + +Any result = await graphql.Mutation( + query: [object]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/graphql/query.md b/docs/examples/1.4.x/server-dotnet/examples/graphql/query.md new file mode 100644 index 0000000000..e019f43e5b --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/graphql/query.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var graphql = new Graphql(client); + +Any result = await graphql.Query( + query: [object]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-antivirus.md new file mode 100644 index 0000000000..b8b0d5d95e --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthAntivirus result = await health.GetAntivirus(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-cache.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..2f36c10f3b --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetCache(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-d-b.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..a263709073 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetDB(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..7850a7555c --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetPubSub(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b2f945cbc7 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueCertificates(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..cf2ed7fc08 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueFunctions(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..8821509dbc --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueLogs(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d2ffb01c4d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueWebhooks(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-queue.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue.md new file mode 100644 index 0000000000..1087bc12c8 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-queue.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetQueue(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..bc60cc6ccd --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetStorageLocal(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get-time.md b/docs/examples/1.4.x/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..15f1745453 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get-time.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthTime result = await health.GetTime(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/health/get.md b/docs/examples/1.4.x/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..d1ddd8fdf0 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/health/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.Get(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/get.md b/docs/examples/1.4.x/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..f049a92072 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +Locale result = await locale.Get(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-codes.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-codes.md new file mode 100644 index 0000000000..9eaab83462 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +LocaleCodeList result = await locale.ListCodes(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-continents.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-continents.md new file mode 100644 index 0000000000..dd91caba9d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +ContinentList result = await locale.ListContinents(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..8692c7b78e --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +CountryList result = await locale.ListCountriesEU(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..8607ae90f5 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +PhoneList result = await locale.ListCountriesPhones(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries.md new file mode 100644 index 0000000000..c67d863856 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +CountryList result = await locale.ListCountries(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-currencies.md new file mode 100644 index 0000000000..1bb3c427e0 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +CurrencyList result = await locale.ListCurrencies(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/locale/list-languages.md b/docs/examples/1.4.x/server-dotnet/examples/locale/list-languages.md new file mode 100644 index 0000000000..1c2897d4fb --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +LanguageList result = await locale.ListLanguages(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-dotnet/examples/storage/create-bucket.md new file mode 100644 index 0000000000..b1da6cb0bd --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +Bucket result = await storage.CreateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.4.x/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..f7d7315209 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +File result = await storage.CreateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]", + file: InputFile.FromPath("./path-to-files/image.jpg")); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-dotnet/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..c8825f3063 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +await storage.DeleteBucket( + bucketId: "[BUCKET_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/delete-file.md b/docs/examples/1.4.x/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..8b70175d97 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +await storage.DeleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-dotnet/examples/storage/get-bucket.md new file mode 100644 index 0000000000..aca9020f28 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +Bucket result = await storage.GetBucket( + bucketId: "[BUCKET_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e6aa24bea3 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +byte[] result = await storage.GetFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..92565ae5ef --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +byte[] result = await storage.GetFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..081f2dce7b --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +byte[] result = await storage.GetFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/get-file.md b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..0299a91bbe --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +File result = await storage.GetFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-dotnet/examples/storage/list-buckets.md new file mode 100644 index 0000000000..2caae5e0af --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/list-buckets.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +BucketList result = await storage.ListBuckets(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/list-files.md b/docs/examples/1.4.x/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..9d861171ac --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +FileList result = await storage.ListFiles( + bucketId: "[BUCKET_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-dotnet/examples/storage/update-bucket.md new file mode 100644 index 0000000000..eac7456209 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +Bucket result = await storage.UpdateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.4.x/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..c51d335eef --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +File result = await storage.UpdateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/create-membership.md b/docs/examples/1.4.x/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..bcc331724e --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Membership result = await teams.CreateMembership( + teamId: "[TEAM_ID]", + roles: new List {}, + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/create.md b/docs/examples/1.4.x/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..fa34098cb2 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/create.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Team result = await teams.Create( + teamId: "[TEAM_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e3c7562f99 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +await teams.DeleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/delete.md b/docs/examples/1.4.x/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..8229839b1c --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +await teams.Delete( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/get-membership.md b/docs/examples/1.4.x/server-dotnet/examples/teams/get-membership.md new file mode 100644 index 0000000000..108dbadbe0 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Membership result = await teams.GetMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-dotnet/examples/teams/get-prefs.md new file mode 100644 index 0000000000..08be12ba83 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var teams = new Teams(client); + +Preferences result = await teams.GetPrefs( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/get.md b/docs/examples/1.4.x/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..f6c92a007b --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Team result = await teams.Get( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-dotnet/examples/teams/list-memberships.md new file mode 100644 index 0000000000..145376cfb9 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/list-memberships.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +MembershipList result = await teams.ListMemberships( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/list.md b/docs/examples/1.4.x/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..1acf615039 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +TeamList result = await teams.List(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-dotnet/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..bb377203cc --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var teams = new Teams(client); + +Membership result = await teams.UpdateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/update-membership.md b/docs/examples/1.4.x/server-dotnet/examples/teams/update-membership.md new file mode 100644 index 0000000000..70ad79f23f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Membership result = await teams.UpdateMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: new List {}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/update-name.md b/docs/examples/1.4.x/server-dotnet/examples/teams/update-name.md new file mode 100644 index 0000000000..1286730437 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Team result = await teams.UpdateName( + teamId: "[TEAM_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-dotnet/examples/teams/update-prefs.md new file mode 100644 index 0000000000..3dfc0a3fc1 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var teams = new Teams(client); + +Preferences result = await teams.UpdatePrefs( + teamId: "[TEAM_ID]", + prefs: [object]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-argon2user.md new file mode 100644 index 0000000000..6038594547 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateArgon2User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..954e1ad1cc --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateBcryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..de54ee98fe --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateMD5User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..e8ede042da --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreatePHPassUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f381619651 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-s-h-a-user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateSHAUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..c16cfe97f9 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateScryptModifiedUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordSaltSeparator: "[PASSWORD_SALT_SEPARATOR]", + passwordSignerKey: "[PASSWORD_SIGNER_KEY]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..1d6e60dd2d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateScryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/create.md b/docs/examples/1.4.x/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..0a8421a544 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/create.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.Create( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/delete-identity.md b/docs/examples/1.4.x/server-dotnet/examples/users/delete-identity.md new file mode 100644 index 0000000000..f1425a9ab3 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.DeleteIdentity( + identityId: "[IDENTITY_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/delete-session.md b/docs/examples/1.4.x/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..841bd456c8 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.DeleteSession( + userId: "[USER_ID]", + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..8ff8f76522 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.DeleteSessions( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/delete.md b/docs/examples/1.4.x/server-dotnet/examples/users/delete.md new file mode 100644 index 0000000000..7833a7950f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.Delete( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/get-prefs.md b/docs/examples/1.4.x/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..c19f5e0778 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +Preferences result = await users.GetPrefs( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/get.md b/docs/examples/1.4.x/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..9c315e6021 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.Get( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/list-identities.md b/docs/examples/1.4.x/server-dotnet/examples/users/list-identities.md new file mode 100644 index 0000000000..af8f99620f --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/list-identities.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +IdentityList result = await users.ListIdentities(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/list-logs.md b/docs/examples/1.4.x/server-dotnet/examples/users/list-logs.md new file mode 100644 index 0000000000..277addcd25 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/list-logs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +LogList result = await users.ListLogs( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/list-memberships.md b/docs/examples/1.4.x/server-dotnet/examples/users/list-memberships.md new file mode 100644 index 0000000000..c25d98b41d --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/list-memberships.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +MembershipList result = await users.ListMemberships( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/list-sessions.md b/docs/examples/1.4.x/server-dotnet/examples/users/list-sessions.md new file mode 100644 index 0000000000..fcd87f01ad --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +SessionList result = await users.ListSessions( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/list.md b/docs/examples/1.4.x/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..9cb177b692 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +UserList result = await users.List(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-email-verification.md new file mode 100644 index 0000000000..2b7a5b8674 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateEmailVerification( + userId: "[USER_ID]", + emailVerification: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-email.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-email.md new file mode 100644 index 0000000000..0d371b13fc --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-email.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateEmail( + userId: "[USER_ID]", + email: "email@example.com"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-labels.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-labels.md new file mode 100644 index 0000000000..97d5db356a --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-labels.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateLabels( + userId: "[USER_ID]", + labels: new List {}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-name.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-name.md new file mode 100644 index 0000000000..f846543117 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateName( + userId: "[USER_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-password.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-password.md new file mode 100644 index 0000000000..ce3241dfd5 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-password.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdatePassword( + userId: "[USER_ID]", + password: ""); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..c2fd1673de --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdatePhoneVerification( + userId: "[USER_ID]", + phoneVerification: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-phone.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-phone.md new file mode 100644 index 0000000000..90728d76c7 --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-phone.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdatePhone( + userId: "[USER_ID]", + number: "+12065550100"); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-prefs.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..a39d54565a --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +Preferences result = await users.UpdatePrefs( + userId: "[USER_ID]", + prefs: [object]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-dotnet/examples/users/update-status.md b/docs/examples/1.4.x/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..713ece02ba --- /dev/null +++ b/docs/examples/1.4.x/server-dotnet/examples/users/update-status.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateStatus( + userId: "[USER_ID]", + status: false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-graphql/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..200e1c6d3a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/create-recovery.md b/docs/examples/1.4.x/server-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..865add6cc5 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/create-verification.md b/docs/examples/1.4.x/server-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..22490be6b0 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/create-verification.md @@ -0,0 +1,11 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/delete-identity.md b/docs/examples/1.4.x/server-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..9bd9f0fa80 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "[IDENTITY_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/delete-session.md b/docs/examples/1.4.x/server-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..013bfa5946 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "[SESSION_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/get-prefs.md b/docs/examples/1.4.x/server-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..6cb48d2b58 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/get-prefs.md @@ -0,0 +1,5 @@ +query { + accountGetPrefs { + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/get-session.md b/docs/examples/1.4.x/server-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..2bf4e28c77 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/get-session.md @@ -0,0 +1,31 @@ +query { + accountGetSession( + sessionId: "[SESSION_ID]" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/get.md b/docs/examples/1.4.x/server-graphql/examples/account/get.md new file mode 100644 index 0000000000..39d06b1e1f --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/get.md @@ -0,0 +1,20 @@ +query { + accountGet { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/list-identities.md b/docs/examples/1.4.x/server-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..25c7e71462 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/list-identities.md @@ -0,0 +1,17 @@ +query { + accountListIdentities { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/list-logs.md b/docs/examples/1.4.x/server-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..95fd3bd7f3 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/list-logs.md @@ -0,0 +1,28 @@ +query { + accountListLogs { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/list-sessions.md b/docs/examples/1.4.x/server-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..a089bf0b99 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/list-sessions.md @@ -0,0 +1,32 @@ +query { + accountListSessions { + total + sessions { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-email.md b/docs/examples/1.4.x/server-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..1c11d65eae --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-email.md @@ -0,0 +1,23 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-name.md b/docs/examples/1.4.x/server-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..0bfa34f84f --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-name.md @@ -0,0 +1,22 @@ +mutation { + accountUpdateName( + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-password.md b/docs/examples/1.4.x/server-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..35e1db66ec --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-password.md @@ -0,0 +1,22 @@ +mutation { + accountUpdatePassword( + password: "" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..103c2faf18 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +mutation { + accountUpdatePhoneVerification( + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-phone.md b/docs/examples/1.4.x/server-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..e1870ed451 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-phone.md @@ -0,0 +1,23 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-prefs.md b/docs/examples/1.4.x/server-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..11e500c343 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-prefs.md @@ -0,0 +1,22 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-recovery.md b/docs/examples/1.4.x/server-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..a0c985d7db --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-session.md b/docs/examples/1.4.x/server-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..0358f49588 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-session.md @@ -0,0 +1,31 @@ +mutation { + accountUpdateSession( + sessionId: "[SESSION_ID]" + ) { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-status.md b/docs/examples/1.4.x/server-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..6f68c7d054 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-status.md @@ -0,0 +1,20 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/account/update-verification.md b/docs/examples/1.4.x/server-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..47abb20d34 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/account/update-verification.md @@ -0,0 +1,12 @@ +mutation { + accountUpdateVerification( + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + userId + secret + expire + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..a76df8a6a2 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +query { + avatarsGetBrowser( + code: "aa" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..84a56c1eaa --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +query { + avatarsGetCreditCard( + code: "amex" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..bfea71f498 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +query { + avatarsGetFavicon( + url: "https://example.com" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6f3b6b5421 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +query { + avatarsGetFlag( + code: "af" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-image.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..3371036d31 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +query { + avatarsGetImage( + url: "https://example.com" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a1d8bef89c --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +query { + avatarsGetInitials { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d2cc1f7f2c --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/avatars/get-q-r.md @@ -0,0 +1,7 @@ +query { + avatarsGetQR( + text: "[TEXT]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8359b45f2b --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -0,0 +1,14 @@ +mutation { + databasesCreateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-collection.md new file mode 100644 index 0000000000..52514e2125 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-collection.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d39a0520ed --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -0,0 +1,15 @@ +mutation { + databasesCreateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-document.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..6ef546c0de --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-document.md @@ -0,0 +1,16 @@ +mutation { + databasesCreateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: "{}" + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..4fcc20de15 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-email-attribute.md @@ -0,0 +1,15 @@ +mutation { + databasesCreateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..8f35d10cae --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-enum-attribute.md @@ -0,0 +1,17 @@ +mutation { + databasesCreateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: [], + required: false + ) { + key + type + status + error + required + elements + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..f85b778390 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-float-attribute.md @@ -0,0 +1,14 @@ +mutation { + databasesCreateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-index.md new file mode 100644 index 0000000000..46ab3439ff --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-index.md @@ -0,0 +1,15 @@ +mutation { + databasesCreateIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + type: "key", + attributes: [] + ) { + key + type + status + error + attributes + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..04c2ae7ede --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-integer-attribute.md @@ -0,0 +1,14 @@ +mutation { + databasesCreateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..442732bfa0 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-ip-attribute.md @@ -0,0 +1,15 @@ +mutation { + databasesCreateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..93fb7ca0dc --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesCreateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + relatedCollectionId: "[RELATED_COLLECTION_ID]", + type: "oneToOne" + ) { + key + type + status + error + required + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..aca9171e07 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-string-attribute.md @@ -0,0 +1,16 @@ +mutation { + databasesCreateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + size: 1, + required: false + ) { + key + type + status + error + required + size + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..65cbbaa819 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create-url-attribute.md @@ -0,0 +1,15 @@ +mutation { + databasesCreateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/create.md b/docs/examples/1.4.x/server-graphql/examples/databases/create.md new file mode 100644 index 0000000000..e784d95975 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/create.md @@ -0,0 +1,12 @@ +mutation { + databasesCreate( + databaseId: "[DATABASE_ID]", + name: "[NAME]" + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..f2cac81fce --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/delete-attribute.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-graphql/examples/databases/delete-collection.md new file mode 100644 index 0000000000..bb7673840d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/delete-collection.md @@ -0,0 +1,8 @@ +mutation { + databasesDeleteCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/delete-document.md b/docs/examples/1.4.x/server-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..74954bb61b --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/delete-index.md b/docs/examples/1.4.x/server-graphql/examples/databases/delete-index.md new file mode 100644 index 0000000000..36764b61da --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/delete-index.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/delete.md b/docs/examples/1.4.x/server-graphql/examples/databases/delete.md new file mode 100644 index 0000000000..184f3a3c68 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/delete.md @@ -0,0 +1,7 @@ +mutation { + databasesDelete( + databaseId: "[DATABASE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/get-attribute.md new file mode 100644 index 0000000000..e93dd7e52d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/get-attribute.md @@ -0,0 +1,9 @@ +query { + databasesGetAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/get-collection.md b/docs/examples/1.4.x/server-graphql/examples/databases/get-collection.md new file mode 100644 index 0000000000..dc4b9701f6 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/get-collection.md @@ -0,0 +1,23 @@ +query { + databasesGetCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/get-document.md b/docs/examples/1.4.x/server-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..94b30290a2 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/get-document.md @@ -0,0 +1,15 @@ +query { + databasesGetDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/get-index.md b/docs/examples/1.4.x/server-graphql/examples/databases/get-index.md new file mode 100644 index 0000000000..d14377d11d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/get-index.md @@ -0,0 +1,13 @@ +query { + databasesGetIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" + ) { + key + type + status + error + attributes + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/get.md b/docs/examples/1.4.x/server-graphql/examples/databases/get.md new file mode 100644 index 0000000000..42a8fe54e3 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/get.md @@ -0,0 +1,11 @@ +query { + databasesGet( + databaseId: "[DATABASE_ID]" + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-graphql/examples/databases/list-attributes.md new file mode 100644 index 0000000000..6b5caa6195 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/list-attributes.md @@ -0,0 +1,9 @@ +query { + databasesListAttributes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" + ) { + total + attributes + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/list-collections.md b/docs/examples/1.4.x/server-graphql/examples/databases/list-collections.md new file mode 100644 index 0000000000..52060fd119 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/list-collections.md @@ -0,0 +1,25 @@ +query { + databasesListCollections( + databaseId: "[DATABASE_ID]" + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + } + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/list-documents.md b/docs/examples/1.4.x/server-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..62d799ad91 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/list-documents.md @@ -0,0 +1,17 @@ +query { + databasesListDocuments( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" + ) { + total + documents { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-graphql/examples/databases/list-indexes.md new file mode 100644 index 0000000000..9f831d6fd1 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +query { + databasesListIndexes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" + ) { + total + indexes { + key + type + status + error + attributes + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/list.md b/docs/examples/1.4.x/server-graphql/examples/databases/list.md new file mode 100644 index 0000000000..6438ed4ca8 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/list.md @@ -0,0 +1,12 @@ +query { + databasesList { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..840c7c07d0 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -0,0 +1,15 @@ +mutation { + databasesUpdateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: false + ) { + key + type + status + error + required + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-collection.md new file mode 100644 index 0000000000..ee3f46d6bb --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-collection.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..bb818b6364 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -0,0 +1,16 @@ +mutation { + databasesUpdateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "" + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-document.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..0476c4ce40 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-document.md @@ -0,0 +1,15 @@ +mutation { + databasesUpdateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8f568b1469 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-email-attribute.md @@ -0,0 +1,16 @@ +mutation { + databasesUpdateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "email@example.com" + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..5fa4c7d56b --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +mutation { + databasesUpdateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: [], + required: false, + default: "[DEFAULT]" + ) { + key + type + status + error + required + elements + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..4268d921ce --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-float-attribute.md @@ -0,0 +1,17 @@ +mutation { + databasesUpdateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + min: 0, + max: 0, + default: 0 + ) { + key + type + status + error + required + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..141d5d1c17 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-integer-attribute.md @@ -0,0 +1,17 @@ +mutation { + databasesUpdateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + min: 0, + max: 0, + default: 0 + ) { + key + type + status + error + required + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..c54f342769 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-ip-attribute.md @@ -0,0 +1,16 @@ +mutation { + databasesUpdateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "" + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..9d17811a7f --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesUpdateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" + ) { + key + type + status + error + required + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..ad0a5e696d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-string-attribute.md @@ -0,0 +1,16 @@ +mutation { + databasesUpdateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "[DEFAULT]" + ) { + key + type + status + error + required + size + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-graphql/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..e40549b01f --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update-url-attribute.md @@ -0,0 +1,16 @@ +mutation { + databasesUpdateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "https://example.com" + ) { + key + type + status + error + required + format + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/databases/update.md b/docs/examples/1.4.x/server-graphql/examples/databases/update.md new file mode 100644 index 0000000000..8ee59ddfd4 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/databases/update.md @@ -0,0 +1,12 @@ +mutation { + databasesUpdate( + databaseId: "[DATABASE_ID]", + name: "[NAME]" + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/create-build.md b/docs/examples/1.4.x/server-graphql/examples/functions/create-build.md new file mode 100644 index 0000000000..7828c633d0 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/create-build.md @@ -0,0 +1,9 @@ +mutation { + functionsCreateBuild( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]", + buildId: "[BUILD_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-graphql/examples/functions/create-deployment.md new file mode 100644 index 0000000000..13b224afec --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: HOSTNAME +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate) { id }" }, "variables": { "functionId": "[FUNCTION_ID]", "code": null, "activate": false } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.4.x/server-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..56e58db014 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/create-execution.md @@ -0,0 +1,28 @@ +mutation { + functionsCreateExecution( + functionId: "[FUNCTION_ID]" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/create-variable.md b/docs/examples/1.4.x/server-graphql/examples/functions/create-variable.md new file mode 100644 index 0000000000..640cac2f38 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +mutation { + functionsCreateVariable( + functionId: "[FUNCTION_ID]", + key: "[KEY]", + value: "[VALUE]" + ) { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/create.md b/docs/examples/1.4.x/server-graphql/examples/functions/create.md new file mode 100644 index 0000000000..b7b6c8fcd4 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/create.md @@ -0,0 +1,38 @@ +mutation { + functionsCreate( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deployment + vars { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-graphql/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..524d3fb36a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-graphql/examples/functions/delete-variable.md new file mode 100644 index 0000000000..bfa7018f38 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/delete.md b/docs/examples/1.4.x/server-graphql/examples/functions/delete.md new file mode 100644 index 0000000000..84c70f4dcc --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/delete.md @@ -0,0 +1,7 @@ +mutation { + functionsDelete( + functionId: "[FUNCTION_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-graphql/examples/functions/download-deployment.md new file mode 100644 index 0000000000..02666132cf --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/download-deployment.md @@ -0,0 +1,8 @@ +query { + functionsDownloadDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-graphql/examples/functions/get-deployment.md new file mode 100644 index 0000000000..480b9dd944 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/get-deployment.md @@ -0,0 +1,30 @@ +query { + functionsGetDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + size + buildId + activate + status + buildLogs + buildTime + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/get-execution.md b/docs/examples/1.4.x/server-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..bf19fca107 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/get-execution.md @@ -0,0 +1,29 @@ +query { + functionsGetExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/get-variable.md b/docs/examples/1.4.x/server-graphql/examples/functions/get-variable.md new file mode 100644 index 0000000000..c41e88391b --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +query { + functionsGetVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]" + ) { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/get.md b/docs/examples/1.4.x/server-graphql/examples/functions/get.md new file mode 100644 index 0000000000..ffb3d6e29c --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/get.md @@ -0,0 +1,36 @@ +query { + functionsGet( + functionId: "[FUNCTION_ID]" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deployment + vars { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-graphql/examples/functions/list-deployments.md new file mode 100644 index 0000000000..ed12c37e19 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/list-deployments.md @@ -0,0 +1,32 @@ +query { + functionsListDeployments( + functionId: "[FUNCTION_ID]" + ) { + total + deployments { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + size + buildId + activate + status + buildLogs + buildTime + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/list-executions.md b/docs/examples/1.4.x/server-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..86b656d428 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/list-executions.md @@ -0,0 +1,31 @@ +query { + functionsListExecutions( + functionId: "[FUNCTION_ID]" + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-graphql/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..2c2b207e60 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/list-runtimes.md @@ -0,0 +1,14 @@ +query { + functionsListRuntimes { + total + runtimes { + _id + name + version + base + image + logo + supports + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/list-variables.md b/docs/examples/1.4.x/server-graphql/examples/functions/list-variables.md new file mode 100644 index 0000000000..477d8abc7a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/list-variables.md @@ -0,0 +1,16 @@ +query { + functionsListVariables( + functionId: "[FUNCTION_ID]" + ) { + total + variables { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/list.md b/docs/examples/1.4.x/server-graphql/examples/functions/list.md new file mode 100644 index 0000000000..49d6271882 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/list.md @@ -0,0 +1,37 @@ +query { + functionsList { + total + functions { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deployment + vars { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-graphql/examples/functions/update-deployment.md new file mode 100644 index 0000000000..8486a7a0d8 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/update-deployment.md @@ -0,0 +1,37 @@ +mutation { + functionsUpdateDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deployment + vars { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/update-variable.md b/docs/examples/1.4.x/server-graphql/examples/functions/update-variable.md new file mode 100644 index 0000000000..d070afb34d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/update-variable.md @@ -0,0 +1,15 @@ +mutation { + functionsUpdateVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]", + key: "[KEY]" + ) { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/functions/update.md b/docs/examples/1.4.x/server-graphql/examples/functions/update.md new file mode 100644 index 0000000000..15903b2080 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/functions/update.md @@ -0,0 +1,38 @@ +mutation { + functionsUpdate( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deployment + vars { + _id + _createdAt + _updatedAt + key + value + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-graphql/examples/health/get-antivirus.md new file mode 100644 index 0000000000..3634dc11c1 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-antivirus.md @@ -0,0 +1,6 @@ +query { + healthGetAntivirus { + version + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-cache.md b/docs/examples/1.4.x/server-graphql/examples/health/get-cache.md new file mode 100644 index 0000000000..3db4076257 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-cache.md @@ -0,0 +1,7 @@ +query { + healthGetCache { + name + ping + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-d-b.md b/docs/examples/1.4.x/server-graphql/examples/health/get-d-b.md new file mode 100644 index 0000000000..16e67c674e --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-d-b.md @@ -0,0 +1,7 @@ +query { + healthGetDB { + name + ping + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-graphql/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..cec6469b31 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-pub-sub.md @@ -0,0 +1,7 @@ +query { + healthGetPubSub { + name + ping + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..2a65b7fbcf --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-certificates.md @@ -0,0 +1,5 @@ +query { + healthGetQueueCertificates { + size + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..93503aa8c5 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-functions.md @@ -0,0 +1,5 @@ +query { + healthGetQueueFunctions { + size + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..14f68cd02e --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-logs.md @@ -0,0 +1,5 @@ +query { + healthGetQueueLogs { + size + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..fdbe435bf8 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-queue-webhooks.md @@ -0,0 +1,5 @@ +query { + healthGetQueueWebhooks { + size + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-queue.md b/docs/examples/1.4.x/server-graphql/examples/health/get-queue.md new file mode 100644 index 0000000000..721501e4bb --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-queue.md @@ -0,0 +1,7 @@ +query { + healthGetQueue { + name + ping + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-graphql/examples/health/get-storage-local.md new file mode 100644 index 0000000000..953af346ae --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-storage-local.md @@ -0,0 +1,7 @@ +query { + healthGetStorageLocal { + name + ping + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get-time.md b/docs/examples/1.4.x/server-graphql/examples/health/get-time.md new file mode 100644 index 0000000000..0def76b9ad --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get-time.md @@ -0,0 +1,7 @@ +query { + healthGetTime { + remoteTime + localTime + diff + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/health/get.md b/docs/examples/1.4.x/server-graphql/examples/health/get.md new file mode 100644 index 0000000000..8481d3625a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/health/get.md @@ -0,0 +1,7 @@ +query { + healthGet { + name + ping + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/get.md b/docs/examples/1.4.x/server-graphql/examples/locale/get.md new file mode 100644 index 0000000000..2b2bbcc1f1 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/get.md @@ -0,0 +1,11 @@ +query { + localeGet { + ip + countryCode + country + continentCode + continent + eu + currency + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-codes.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..0164cc3782 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +query { + localeListCodes { + total + localeCodes { + code + name + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-continents.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..41f672c565 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +query { + localeListContinents { + total + continents { + name + code + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..00cd4652f9 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +query { + localeListCountriesEU { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..33d2296850 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +query { + localeListCountriesPhones { + total + phones { + code + countryCode + countryName + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-countries.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..9312bc94b1 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +query { + localeListCountries { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..cde3ab488a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-currencies.md @@ -0,0 +1,14 @@ +query { + localeListCurrencies { + total + currencies { + symbol + name + symbolNative + decimalDigits + rounding + code + namePlural + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/locale/list-languages.md b/docs/examples/1.4.x/server-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..b0d76c522b --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +query { + localeListLanguages { + total + languages { + name + code + nativeName + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-graphql/examples/storage/create-bucket.md new file mode 100644 index 0000000000..3edf18d127 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/create-bucket.md @@ -0,0 +1,19 @@ +mutation { + storageCreateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.4.x/server-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..120ac452f3 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/create-file.md @@ -0,0 +1,25 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: HOSTNAME +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file) { id }" }, "variables": { "bucketId": "[BUCKET_ID]", "fileId": "[FILE_ID]", "file": null } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"] } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-graphql/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..aaf33a9671 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +mutation { + storageDeleteBucket( + bucketId: "[BUCKET_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/delete-file.md b/docs/examples/1.4.x/server-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..7ec3757a8c --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-graphql/examples/storage/get-bucket.md new file mode 100644 index 0000000000..02656ece76 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/get-bucket.md @@ -0,0 +1,18 @@ +query { + storageGetBucket( + bucketId: "[BUCKET_ID]" + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..845547f09b --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/get-file-download.md @@ -0,0 +1,8 @@ +query { + storageGetFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c26e90dac2 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/get-file-preview.md @@ -0,0 +1,8 @@ +query { + storageGetFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..72e9ec20d2 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/get-file-view.md @@ -0,0 +1,8 @@ +query { + storageGetFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/get-file.md b/docs/examples/1.4.x/server-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..61182e1f02 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/get-file.md @@ -0,0 +1,18 @@ +query { + storageGetFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-graphql/examples/storage/list-buckets.md new file mode 100644 index 0000000000..5665a215b7 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/list-buckets.md @@ -0,0 +1,19 @@ +query { + storageListBuckets { + total + buckets { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/list-files.md b/docs/examples/1.4.x/server-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..430fc1dbdf --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/list-files.md @@ -0,0 +1,20 @@ +query { + storageListFiles( + bucketId: "[BUCKET_ID]" + ) { + total + files { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-graphql/examples/storage/update-bucket.md new file mode 100644 index 0000000000..b6372efc0f --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/update-bucket.md @@ -0,0 +1,19 @@ +mutation { + storageUpdateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/storage/update-file.md b/docs/examples/1.4.x/server-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..0a4c98d087 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/storage/update-file.md @@ -0,0 +1,18 @@ +mutation { + storageUpdateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/create-membership.md b/docs/examples/1.4.x/server-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..045a0ae7a8 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +mutation { + teamsCreateMembership( + teamId: "[TEAM_ID]", + roles: [], + url: "https://example.com" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/create.md b/docs/examples/1.4.x/server-graphql/examples/teams/create.md new file mode 100644 index 0000000000..2dd3ca74fb --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/create.md @@ -0,0 +1,15 @@ +mutation { + teamsCreate( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..b8a5252fcf --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/delete.md b/docs/examples/1.4.x/server-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..161f8a3454 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "[TEAM_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/get-membership.md b/docs/examples/1.4.x/server-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..d28ef798fa --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/get-membership.md @@ -0,0 +1,19 @@ +query { + teamsGetMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ce6b851e9e --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +query { + teamsGetPrefs( + teamId: "[TEAM_ID]" + ) { + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/get.md b/docs/examples/1.4.x/server-graphql/examples/teams/get.md new file mode 100644 index 0000000000..aa83e30e73 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/get.md @@ -0,0 +1,14 @@ +query { + teamsGet( + teamId: "[TEAM_ID]" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..8ac82c1faf --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/list-memberships.md @@ -0,0 +1,21 @@ +query { + teamsListMemberships( + teamId: "[TEAM_ID]" + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/list.md b/docs/examples/1.4.x/server-graphql/examples/teams/list.md new file mode 100644 index 0000000000..47117c5627 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/list.md @@ -0,0 +1,15 @@ +query { + teamsList { + total + teams { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..ca6cec12e1 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/update-membership.md b/docs/examples/1.4.x/server-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..e56e0c46af --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/update-membership.md @@ -0,0 +1,20 @@ +mutation { + teamsUpdateMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/update-name.md b/docs/examples/1.4.x/server-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..88e994b63a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..55ed909fe3 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "[TEAM_ID]", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-argon2user.md new file mode 100644 index 0000000000..80530225e8 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-argon2user.md @@ -0,0 +1,24 @@ +mutation { + usersCreateArgon2User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..9f1c22448d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-bcrypt-user.md @@ -0,0 +1,24 @@ +mutation { + usersCreateBcryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..111a5783d9 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-m-d5user.md @@ -0,0 +1,24 @@ +mutation { + usersCreateMD5User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..b4012cc222 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-p-h-pass-user.md @@ -0,0 +1,24 @@ +mutation { + usersCreatePHPassUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..799093d994 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-s-h-a-user.md @@ -0,0 +1,24 @@ +mutation { + usersCreateSHAUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..b6d6e5dab9 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,27 @@ +mutation { + usersCreateScryptModifiedUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordSaltSeparator: "[PASSWORD_SALT_SEPARATOR]", + passwordSignerKey: "[PASSWORD_SIGNER_KEY]" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..b817509f5c --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create-scrypt-user.md @@ -0,0 +1,29 @@ +mutation { + usersCreateScryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0 + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/create.md b/docs/examples/1.4.x/server-graphql/examples/users/create.md new file mode 100644 index 0000000000..eaf12dafb2 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/create.md @@ -0,0 +1,22 @@ +mutation { + usersCreate( + userId: "[USER_ID]" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/delete-identity.md b/docs/examples/1.4.x/server-graphql/examples/users/delete-identity.md new file mode 100644 index 0000000000..722caa7147 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteIdentity( + identityId: "[IDENTITY_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/delete-session.md b/docs/examples/1.4.x/server-graphql/examples/users/delete-session.md new file mode 100644 index 0000000000..72cb167b00 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/delete-session.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteSession( + userId: "[USER_ID]", + sessionId: "[SESSION_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-graphql/examples/users/delete-sessions.md new file mode 100644 index 0000000000..28ed911611 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteSessions( + userId: "[USER_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/delete.md b/docs/examples/1.4.x/server-graphql/examples/users/delete.md new file mode 100644 index 0000000000..39673f1c85 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/delete.md @@ -0,0 +1,7 @@ +mutation { + usersDelete( + userId: "[USER_ID]" + ) { + status + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/get-prefs.md b/docs/examples/1.4.x/server-graphql/examples/users/get-prefs.md new file mode 100644 index 0000000000..e492952676 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/get-prefs.md @@ -0,0 +1,7 @@ +query { + usersGetPrefs( + userId: "[USER_ID]" + ) { + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/get.md b/docs/examples/1.4.x/server-graphql/examples/users/get.md new file mode 100644 index 0000000000..52bba40d3a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/get.md @@ -0,0 +1,22 @@ +query { + usersGet( + userId: "[USER_ID]" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/list-identities.md b/docs/examples/1.4.x/server-graphql/examples/users/list-identities.md new file mode 100644 index 0000000000..c06ad8941e --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/list-identities.md @@ -0,0 +1,17 @@ +query { + usersListIdentities { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/list-logs.md b/docs/examples/1.4.x/server-graphql/examples/users/list-logs.md new file mode 100644 index 0000000000..d13a8321ed --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/list-logs.md @@ -0,0 +1,30 @@ +query { + usersListLogs( + userId: "[USER_ID]" + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/list-memberships.md b/docs/examples/1.4.x/server-graphql/examples/users/list-memberships.md new file mode 100644 index 0000000000..33b7a56d02 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/list-memberships.md @@ -0,0 +1,21 @@ +query { + usersListMemberships( + userId: "[USER_ID]" + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + roles + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/list-sessions.md b/docs/examples/1.4.x/server-graphql/examples/users/list-sessions.md new file mode 100644 index 0000000000..d1b608f43d --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/list-sessions.md @@ -0,0 +1,34 @@ +query { + usersListSessions( + userId: "[USER_ID]" + ) { + total + sessions { + _id + _createdAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/list.md b/docs/examples/1.4.x/server-graphql/examples/users/list.md new file mode 100644 index 0000000000..407e2e4df3 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/list.md @@ -0,0 +1,23 @@ +query { + usersList { + total + users { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-graphql/examples/users/update-email-verification.md new file mode 100644 index 0000000000..e376522e18 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-email-verification.md @@ -0,0 +1,23 @@ +mutation { + usersUpdateEmailVerification( + userId: "[USER_ID]", + emailVerification: false + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-email.md b/docs/examples/1.4.x/server-graphql/examples/users/update-email.md new file mode 100644 index 0000000000..7a28a129cf --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-email.md @@ -0,0 +1,23 @@ +mutation { + usersUpdateEmail( + userId: "[USER_ID]", + email: "email@example.com" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-labels.md b/docs/examples/1.4.x/server-graphql/examples/users/update-labels.md new file mode 100644 index 0000000000..82da4b8584 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-labels.md @@ -0,0 +1,23 @@ +mutation { + usersUpdateLabels( + userId: "[USER_ID]", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-name.md b/docs/examples/1.4.x/server-graphql/examples/users/update-name.md new file mode 100644 index 0000000000..5007fe46d1 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-name.md @@ -0,0 +1,23 @@ +mutation { + usersUpdateName( + userId: "[USER_ID]", + name: "[NAME]" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-password.md b/docs/examples/1.4.x/server-graphql/examples/users/update-password.md new file mode 100644 index 0000000000..1e93b1cede --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-password.md @@ -0,0 +1,23 @@ +mutation { + usersUpdatePassword( + userId: "[USER_ID]", + password: "" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-graphql/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..7c0c556d6a --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-phone-verification.md @@ -0,0 +1,23 @@ +mutation { + usersUpdatePhoneVerification( + userId: "[USER_ID]", + phoneVerification: false + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-phone.md b/docs/examples/1.4.x/server-graphql/examples/users/update-phone.md new file mode 100644 index 0000000000..673274faec --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-phone.md @@ -0,0 +1,23 @@ +mutation { + usersUpdatePhone( + userId: "[USER_ID]", + number: "+12065550100" + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-prefs.md b/docs/examples/1.4.x/server-graphql/examples/users/update-prefs.md new file mode 100644 index 0000000000..06954a8ac5 --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + usersUpdatePrefs( + userId: "[USER_ID]", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.4.x/server-graphql/examples/users/update-status.md b/docs/examples/1.4.x/server-graphql/examples/users/update-status.md new file mode 100644 index 0000000000..050bcbf7af --- /dev/null +++ b/docs/examples/1.4.x/server-graphql/examples/users/update-status.md @@ -0,0 +1,23 @@ +mutation { + usersUpdateStatus( + userId: "[USER_ID]", + status: false + ) { + _id + _createdAt + _updatedAt + name + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + prefs { + data + } + accessedAt + } +} diff --git a/docs/examples/1.4.x/server-kotlin/java/account/create-phone-verification.md b/docs/examples/1.4.x/server-kotlin/java/account/create-phone-verification.md new file mode 100644 index 0000000000..013b357f88 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/create-phone-verification.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/create-recovery.md b/docs/examples/1.4.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 0000000000..284efc8107 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/create-verification.md b/docs/examples/1.4.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 0000000000..0280b4b15b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.createVerification( + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/delete-identity.md b/docs/examples/1.4.x/server-kotlin/java/account/delete-identity.md new file mode 100644 index 0000000000..54bad5a9f0 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/delete-identity.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.deleteIdentity( + "[IDENTITY_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/delete-session.md b/docs/examples/1.4.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 0000000000..2cd069eaa1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.deleteSession( + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/1.4.x/server-kotlin/java/account/delete-sessions.md new file mode 100644 index 0000000000..7a9999d398 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/get-prefs.md b/docs/examples/1.4.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 0000000000..3f6cd20c9d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/get-session.md b/docs/examples/1.4.x/server-kotlin/java/account/get-session.md new file mode 100644 index 0000000000..17229e29de --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.getSession( + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/get.md b/docs/examples/1.4.x/server-kotlin/java/account/get.md new file mode 100644 index 0000000000..80a4988af5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/list-identities.md b/docs/examples/1.4.x/server-kotlin/java/account/list-identities.md new file mode 100644 index 0000000000..d6fcb68127 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/list-identities.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.listIdentities( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/list-logs.md b/docs/examples/1.4.x/server-kotlin/java/account/list-logs.md new file mode 100644 index 0000000000..971ac866e1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/list-logs.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.listLogs( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/list-sessions.md b/docs/examples/1.4.x/server-kotlin/java/account/list-sessions.md new file mode 100644 index 0000000000..9d7e6308e5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/list-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-email.md b/docs/examples/1.4.x/server-kotlin/java/account/update-email.md new file mode 100644 index 0000000000..67ab31ad88 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-name.md b/docs/examples/1.4.x/server-kotlin/java/account/update-name.md new file mode 100644 index 0000000000..6900f12174 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updateName( + "[NAME]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-password.md b/docs/examples/1.4.x/server-kotlin/java/account/update-password.md new file mode 100644 index 0000000000..ace01fcc9a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updatePassword( + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-phone-verification.md b/docs/examples/1.4.x/server-kotlin/java/account/update-phone-verification.md new file mode 100644 index 0000000000..8c3c9756de --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-phone-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updatePhoneVerification( + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-phone.md b/docs/examples/1.4.x/server-kotlin/java/account/update-phone.md new file mode 100644 index 0000000000..9365a0f0b9 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-phone.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-prefs.md b/docs/examples/1.4.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 0000000000..24a3625834 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-recovery.md b/docs/examples/1.4.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 0000000000..bc3251d160 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updateRecovery( + "[USER_ID]", + "[SECRET]", + "password", + "password" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-session.md b/docs/examples/1.4.x/server-kotlin/java/account/update-session.md new file mode 100644 index 0000000000..62d77e1366 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updateSession( + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-status.md b/docs/examples/1.4.x/server-kotlin/java/account/update-status.md new file mode 100644 index 0000000000..4af2cf1083 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-status.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/account/update-verification.md b/docs/examples/1.4.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 0000000000..2190daf1b7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Account account = new Account(client); + +account.updateVerification( + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 0000000000..42e8e57ee1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + "aa", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..5e3b32b527 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + "amex", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 0000000000..109f88f719 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 0000000000..6ad820ae7a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + "af", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-image.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 0000000000..2680544988 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 0000000000..8a86e7a01b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/1.4.x/server-kotlin/java/avatars/get-q-r.md new file mode 100644 index 0000000000..c57d70a840 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/avatars/get-q-r.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "[TEXT]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..6e79f0a917 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-boolean-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createBooleanAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-collection.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-collection.md new file mode 100644 index 0000000000..96b5d9b974 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createCollection( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..307a8ffb65 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-datetime-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDatetimeAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-document.md new file mode 100644 index 0000000000..029c3f7a25 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + mapOf( "a" to "b" ), + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-email-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-email-attribute.md new file mode 100644 index 0000000000..8774c550b7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-email-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEmailAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-enum-attribute.md new file mode 100644 index 0000000000..e2cf6a28df --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-enum-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEnumAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + listOf(), + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-float-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-float-attribute.md new file mode 100644 index 0000000000..0fba6ac073 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-float-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createFloatAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-index.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-index.md new file mode 100644 index 0000000000..5dbdce895b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-index.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIndex( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + "key", + listOf(), + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-integer-attribute.md new file mode 100644 index 0000000000..5446862fdb --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-integer-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIntegerAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-ip-attribute.md new file mode 100644 index 0000000000..fe37da96d5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-ip-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIpAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..0b7e5f999f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-relationship-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createRelationshipAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[RELATED_COLLECTION_ID]", + "oneToOne", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-string-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-string-attribute.md new file mode 100644 index 0000000000..a9b1916066 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-string-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createStringAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + 1, + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create-url-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/create-url-attribute.md new file mode 100644 index 0000000000..9c504d862b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create-url-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createUrlAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/create.md b/docs/examples/1.4.x/server-kotlin/java/databases/create.md new file mode 100644 index 0000000000..a323434059 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/create.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.create( + "[DATABASE_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/delete-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/delete-attribute.md new file mode 100644 index 0000000000..68aeecd93b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/delete-attribute.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/delete-collection.md b/docs/examples/1.4.x/server-kotlin/java/databases/delete-collection.md new file mode 100644 index 0000000000..cd328b48a6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/delete-collection.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteCollection( + "[DATABASE_ID]", + "[COLLECTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/delete-document.md b/docs/examples/1.4.x/server-kotlin/java/databases/delete-document.md new file mode 100644 index 0000000000..4f4c8495c3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/delete-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/delete-index.md b/docs/examples/1.4.x/server-kotlin/java/databases/delete-index.md new file mode 100644 index 0000000000..640bd0fc31 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/delete-index.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteIndex( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/delete.md b/docs/examples/1.4.x/server-kotlin/java/databases/delete.md new file mode 100644 index 0000000000..897a450fa4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.delete( + "[DATABASE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/get-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/get-attribute.md new file mode 100644 index 0000000000..79c1d2b2ad --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/get-attribute.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/get-collection.md b/docs/examples/1.4.x/server-kotlin/java/databases/get-collection.md new file mode 100644 index 0000000000..3ecfa0ca80 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/get-collection.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getCollection( + "[DATABASE_ID]", + "[COLLECTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/get-document.md b/docs/examples/1.4.x/server-kotlin/java/databases/get-document.md new file mode 100644 index 0000000000..2061bed202 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/get-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/get-index.md b/docs/examples/1.4.x/server-kotlin/java/databases/get-index.md new file mode 100644 index 0000000000..2bf036a057 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/get-index.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getIndex( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/get.md b/docs/examples/1.4.x/server-kotlin/java/databases/get.md new file mode 100644 index 0000000000..066ec4d262 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.get( + "[DATABASE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/list-attributes.md b/docs/examples/1.4.x/server-kotlin/java/databases/list-attributes.md new file mode 100644 index 0000000000..f42baa02f4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/list-attributes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listAttributes( + "[DATABASE_ID]", + "[COLLECTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/list-collections.md b/docs/examples/1.4.x/server-kotlin/java/databases/list-collections.md new file mode 100644 index 0000000000..67c343f38a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/list-collections.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listCollections( + "[DATABASE_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/list-documents.md b/docs/examples/1.4.x/server-kotlin/java/databases/list-documents.md new file mode 100644 index 0000000000..7a4a1b70b2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/list-documents.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listDocuments( + "[DATABASE_ID]", + "[COLLECTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/list-indexes.md b/docs/examples/1.4.x/server-kotlin/java/databases/list-indexes.md new file mode 100644 index 0000000000..be50cdd900 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/list-indexes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listIndexes( + "[DATABASE_ID]", + "[COLLECTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/list.md b/docs/examples/1.4.x/server-kotlin/java/databases/list.md new file mode 100644 index 0000000000..04f81867f0 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/list.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.list( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..97cee2d548 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-boolean-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateBooleanAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + false + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-collection.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-collection.md new file mode 100644 index 0000000000..3f25c5047e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateCollection( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..503f2debdf --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-datetime-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDatetimeAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-document.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-document.md new file mode 100644 index 0000000000..e9a596d3d4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDocument( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-email-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-email-attribute.md new file mode 100644 index 0000000000..39ea153834 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-email-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEmailAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + "email@example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-enum-attribute.md new file mode 100644 index 0000000000..969ea4eece --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-enum-attribute.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEnumAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + listOf(), + false, + "[DEFAULT]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-float-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-float-attribute.md new file mode 100644 index 0000000000..67d76e425f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-float-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateFloatAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + 0, + 0, + 0 + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-integer-attribute.md new file mode 100644 index 0000000000..b9308dc22b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-integer-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIntegerAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + 0, + 0, + 0 + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-ip-attribute.md new file mode 100644 index 0000000000..6a936a5f36 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-ip-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIpAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..272952b597 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-relationship-attribute.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateRelationshipAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-string-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-string-attribute.md new file mode 100644 index 0000000000..aba0d0e53c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-string-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateStringAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + "[DEFAULT]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update-url-attribute.md b/docs/examples/1.4.x/server-kotlin/java/databases/update-url-attribute.md new file mode 100644 index 0000000000..87ab384929 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update-url-attribute.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateUrlAttribute( + "[DATABASE_ID]", + "[COLLECTION_ID]", + "", + false, + "https://example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/databases/update.md b/docs/examples/1.4.x/server-kotlin/java/databases/update.md new file mode 100644 index 0000000000..b706df6524 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/databases/update.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Databases databases = new Databases(client); + +databases.update( + "[DATABASE_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/create-build.md b/docs/examples/1.4.x/server-kotlin/java/functions/create-build.md new file mode 100644 index 0000000000..10c8d2fc80 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/create-build.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createBuild( + "[FUNCTION_ID]", + "[DEPLOYMENT_ID]", + "[BUILD_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/create-deployment.md b/docs/examples/1.4.x/server-kotlin/java/functions/create-deployment.md new file mode 100644 index 0000000000..4e6da33482 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/create-deployment.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDeployment( + "[FUNCTION_ID]", + InputFile.fromPath("file.png"), + false, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.4.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 0000000000..315f57d5cb --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createExecution( + "[FUNCTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/create-variable.md b/docs/examples/1.4.x/server-kotlin/java/functions/create-variable.md new file mode 100644 index 0000000000..5e9c5a66bd --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/create-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVariable( + "[FUNCTION_ID]", + "[KEY]", + "[VALUE]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/create.md b/docs/examples/1.4.x/server-kotlin/java/functions/create.md new file mode 100644 index 0000000000..2386c1bbad --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/create.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.create( + "[FUNCTION_ID]", + "[NAME]", + "node-14.5", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/delete-deployment.md b/docs/examples/1.4.x/server-kotlin/java/functions/delete-deployment.md new file mode 100644 index 0000000000..703dce63aa --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/delete-deployment.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteDeployment( + "[FUNCTION_ID]", + "[DEPLOYMENT_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/delete-variable.md b/docs/examples/1.4.x/server-kotlin/java/functions/delete-variable.md new file mode 100644 index 0000000000..d36615092d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/delete-variable.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteVariable( + "[FUNCTION_ID]", + "[VARIABLE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/delete.md b/docs/examples/1.4.x/server-kotlin/java/functions/delete.md new file mode 100644 index 0000000000..8f39896411 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.delete( + "[FUNCTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/download-deployment.md b/docs/examples/1.4.x/server-kotlin/java/functions/download-deployment.md new file mode 100644 index 0000000000..91898dc07a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/download-deployment.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.downloadDeployment( + "[FUNCTION_ID]", + "[DEPLOYMENT_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/get-deployment.md b/docs/examples/1.4.x/server-kotlin/java/functions/get-deployment.md new file mode 100644 index 0000000000..5b539d2801 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/get-deployment.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeployment( + "[FUNCTION_ID]", + "[DEPLOYMENT_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/get-execution.md b/docs/examples/1.4.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 0000000000..b1ff9485e8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getExecution( + "[FUNCTION_ID]", + "[EXECUTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/get-variable.md b/docs/examples/1.4.x/server-kotlin/java/functions/get-variable.md new file mode 100644 index 0000000000..2be25a5c73 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/get-variable.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getVariable( + "[FUNCTION_ID]", + "[VARIABLE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/get.md b/docs/examples/1.4.x/server-kotlin/java/functions/get.md new file mode 100644 index 0000000000..8ad5ea3522 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.get( + "[FUNCTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/list-deployments.md b/docs/examples/1.4.x/server-kotlin/java/functions/list-deployments.md new file mode 100644 index 0000000000..61f48c88c3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/list-deployments.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listDeployments( + "[FUNCTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/list-executions.md b/docs/examples/1.4.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 0000000000..392e9c82c5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listExecutions( + "[FUNCTION_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/list-runtimes.md b/docs/examples/1.4.x/server-kotlin/java/functions/list-runtimes.md new file mode 100644 index 0000000000..46d0446310 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/list-runtimes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listRuntimes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/list-variables.md b/docs/examples/1.4.x/server-kotlin/java/functions/list-variables.md new file mode 100644 index 0000000000..4fa47e8c57 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/list-variables.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listVariables( + "[FUNCTION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/list.md b/docs/examples/1.4.x/server-kotlin/java/functions/list.md new file mode 100644 index 0000000000..4224cf52b7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/list.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.list( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/update-deployment.md b/docs/examples/1.4.x/server-kotlin/java/functions/update-deployment.md new file mode 100644 index 0000000000..2af0637379 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/update-deployment.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateDeployment( + "[FUNCTION_ID]", + "[DEPLOYMENT_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/update-variable.md b/docs/examples/1.4.x/server-kotlin/java/functions/update-variable.md new file mode 100644 index 0000000000..f30bbf8e4e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/update-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateVariable( + "[FUNCTION_ID]", + "[VARIABLE_ID]", + "[KEY]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/functions/update.md b/docs/examples/1.4.x/server-kotlin/java/functions/update.md new file mode 100644 index 0000000000..355aa4e326 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/functions/update.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Functions functions = new Functions(client); + +functions.update( + "[FUNCTION_ID]", + "[NAME]", + "node-14.5", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/graphql/mutation.md b/docs/examples/1.4.x/server-kotlin/java/graphql/mutation.md new file mode 100644 index 0000000000..d689c62e60 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/graphql/mutation.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/graphql/query.md b/docs/examples/1.4.x/server-kotlin/java/graphql/query.md new file mode 100644 index 0000000000..e4b8693b4f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/graphql/query.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-antivirus.md b/docs/examples/1.4.x/server-kotlin/java/health/get-antivirus.md new file mode 100644 index 0000000000..334563fd1c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-antivirus.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getAntivirus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-cache.md b/docs/examples/1.4.x/server-kotlin/java/health/get-cache.md new file mode 100644 index 0000000000..9a2981253a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-cache.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getCache(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-d-b.md b/docs/examples/1.4.x/server-kotlin/java/health/get-d-b.md new file mode 100644 index 0000000000..22a5a6b5bb --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-d-b.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getDB(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-pub-sub.md b/docs/examples/1.4.x/server-kotlin/java/health/get-pub-sub.md new file mode 100644 index 0000000000..ba94519084 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-pub-sub.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getPubSub(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-certificates.md new file mode 100644 index 0000000000..a0a3a22f8a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-certificates.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getQueueCertificates(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-functions.md new file mode 100644 index 0000000000..54b425f63c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-functions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getQueueFunctions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-logs.md new file mode 100644 index 0000000000..371c98f06d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-logs.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getQueueLogs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-webhooks.md new file mode 100644 index 0000000000..cbd6919d72 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-queue-webhooks.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getQueueWebhooks(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-queue.md b/docs/examples/1.4.x/server-kotlin/java/health/get-queue.md new file mode 100644 index 0000000000..90b7eb35ad --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-queue.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getQueue(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/1.4.x/server-kotlin/java/health/get-storage-local.md new file mode 100644 index 0000000000..a57f34520d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-storage-local.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getStorageLocal(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get-time.md b/docs/examples/1.4.x/server-kotlin/java/health/get-time.md new file mode 100644 index 0000000000..36b276b4d7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get-time.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.getTime(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/health/get.md b/docs/examples/1.4.x/server-kotlin/java/health/get.md new file mode 100644 index 0000000000..59badb0543 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/health/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Health health = new Health(client); + +health.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/get.md b/docs/examples/1.4.x/server-kotlin/java/locale/get.md new file mode 100644 index 0000000000..4fb6be9416 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-codes.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-codes.md new file mode 100644 index 0000000000..a3feffe066 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-continents.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-continents.md new file mode 100644 index 0000000000..661fcc3583 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-continents.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..6164ca02d2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-countries-e-u.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-countries-phones.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..2cb41c19f2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-countries-phones.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-countries.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-countries.md new file mode 100644 index 0000000000..74d3b5d402 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-countries.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-currencies.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-currencies.md new file mode 100644 index 0000000000..54a0e4de40 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-currencies.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/locale/list-languages.md b/docs/examples/1.4.x/server-kotlin/java/locale/list-languages.md new file mode 100644 index 0000000000..54976c5c08 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/locale/list-languages.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/create-bucket.md b/docs/examples/1.4.x/server-kotlin/java/storage/create-bucket.md new file mode 100644 index 0000000000..c9ebc9178c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/create-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.createBucket( + "[BUCKET_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/create-file.md b/docs/examples/1.4.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 0000000000..c83557bf28 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.createFile( + "[BUCKET_ID]", + "[FILE_ID]", + InputFile.fromPath("file.png"), + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/delete-bucket.md b/docs/examples/1.4.x/server-kotlin/java/storage/delete-bucket.md new file mode 100644 index 0000000000..f26e9ee5a1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/delete-bucket.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.deleteBucket( + "[BUCKET_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/delete-file.md b/docs/examples/1.4.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 0000000000..eb00b9706c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.deleteFile( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/get-bucket.md b/docs/examples/1.4.x/server-kotlin/java/storage/get-bucket.md new file mode 100644 index 0000000000..2157dd7424 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/get-bucket.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getBucket( + "[BUCKET_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/1.4.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 0000000000..8eef7e347e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getFileDownload( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/1.4.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 0000000000..275e803000 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getFilePreview( + "[BUCKET_ID]", + "[FILE_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/1.4.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 0000000000..adc0407c35 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getFileView( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/get-file.md b/docs/examples/1.4.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 0000000000..4cb6fe6db3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getFile( + "[BUCKET_ID]", + "[FILE_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/list-buckets.md b/docs/examples/1.4.x/server-kotlin/java/storage/list-buckets.md new file mode 100644 index 0000000000..49c29cad2d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/list-buckets.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.listBuckets( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/list-files.md b/docs/examples/1.4.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 0000000000..59719e530f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.listFiles( + "[BUCKET_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/update-bucket.md b/docs/examples/1.4.x/server-kotlin/java/storage/update-bucket.md new file mode 100644 index 0000000000..05483ea725 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/update-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.updateBucket( + "[BUCKET_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/storage/update-file.md b/docs/examples/1.4.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 0000000000..05385c2b88 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Storage storage = new Storage(client); + +storage.updateFile( + "[BUCKET_ID]", + "[FILE_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/create-membership.md b/docs/examples/1.4.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 0000000000..0ad2dd1bf0 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.createMembership( + "[TEAM_ID]", + listOf(), + "https://example.com", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/create.md b/docs/examples/1.4.x/server-kotlin/java/teams/create.md new file mode 100644 index 0000000000..4f3be33609 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/create.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.create( + "[TEAM_ID]", + "[NAME]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/1.4.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 0000000000..e82ab293be --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.deleteMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/delete.md b/docs/examples/1.4.x/server-kotlin/java/teams/delete.md new file mode 100644 index 0000000000..fa805ebd4d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.delete( + "[TEAM_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/get-membership.md b/docs/examples/1.4.x/server-kotlin/java/teams/get-membership.md new file mode 100644 index 0000000000..fc00d43873 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/get-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.getMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/get-prefs.md b/docs/examples/1.4.x/server-kotlin/java/teams/get-prefs.md new file mode 100644 index 0000000000..b14dfc94d3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/get-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Teams teams = new Teams(client); + +teams.getPrefs( + "[TEAM_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/get.md b/docs/examples/1.4.x/server-kotlin/java/teams/get.md new file mode 100644 index 0000000000..6be034b418 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.get( + "[TEAM_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/list-memberships.md b/docs/examples/1.4.x/server-kotlin/java/teams/list-memberships.md new file mode 100644 index 0000000000..0b9055f816 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/list-memberships.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.listMemberships( + "[TEAM_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/list.md b/docs/examples/1.4.x/server-kotlin/java/teams/list.md new file mode 100644 index 0000000000..22a9d51d5f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/list.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.list( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/1.4.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 0000000000..64e69663d4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + "[USER_ID]", + "[SECRET]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/update-membership.md b/docs/examples/1.4.x/server-kotlin/java/teams/update-membership.md new file mode 100644 index 0000000000..e1fd4325ee --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/update-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.updateMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + listOf() + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/update-name.md b/docs/examples/1.4.x/server-kotlin/java/teams/update-name.md new file mode 100644 index 0000000000..3d95ccb9d2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Teams teams = new Teams(client); + +teams.updateName( + "[TEAM_ID]", + "[NAME]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/teams/update-prefs.md b/docs/examples/1.4.x/server-kotlin/java/teams/update-prefs.md new file mode 100644 index 0000000000..674bc6424d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/teams/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +Teams teams = new Teams(client); + +teams.updatePrefs( + "[TEAM_ID]", + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-argon2user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-argon2user.md new file mode 100644 index 0000000000..47ac52c086 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-argon2user.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createArgon2User( + "[USER_ID]", + "email@example.com", + "password", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-bcrypt-user.md new file mode 100644 index 0000000000..91989dff0f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-bcrypt-user.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createBcryptUser( + "[USER_ID]", + "email@example.com", + "password", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-m-d5user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-m-d5user.md new file mode 100644 index 0000000000..35de18d1a3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-m-d5user.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createMD5User( + "[USER_ID]", + "email@example.com", + "password", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..7501f02f2f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-p-h-pass-user.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createPHPassUser( + "[USER_ID]", + "email@example.com", + "password", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-s-h-a-user.md new file mode 100644 index 0000000000..ae26de5543 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-s-h-a-user.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createSHAUser( + "[USER_ID]", + "email@example.com", + "password", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..da0936a01b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-modified-user.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createScryptModifiedUser( + "[USER_ID]", + "email@example.com", + "password", + "[PASSWORD_SALT]", + "[PASSWORD_SALT_SEPARATOR]", + "[PASSWORD_SIGNER_KEY]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-user.md b/docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-user.md new file mode 100644 index 0000000000..9b48e06fbd --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create-scrypt-user.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.createScryptUser( + "[USER_ID]", + "email@example.com", + "password", + "[PASSWORD_SALT]", + 0, + 0, + 0, + 0, + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/create.md b/docs/examples/1.4.x/server-kotlin/java/users/create.md new file mode 100644 index 0000000000..97aad15302 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/create.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.create( + "[USER_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/delete-identity.md b/docs/examples/1.4.x/server-kotlin/java/users/delete-identity.md new file mode 100644 index 0000000000..cd165a6dc0 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/delete-identity.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.deleteIdentity( + "[IDENTITY_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/delete-session.md b/docs/examples/1.4.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 0000000000..8415328406 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.deleteSession( + "[USER_ID]", + "[SESSION_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/1.4.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 0000000000..9a2284c493 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.deleteSessions( + "[USER_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/delete.md b/docs/examples/1.4.x/server-kotlin/java/users/delete.md new file mode 100644 index 0000000000..893a4d3794 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.delete( + "[USER_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/get-prefs.md b/docs/examples/1.4.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 0000000000..664843e32c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.getPrefs( + "[USER_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/get.md b/docs/examples/1.4.x/server-kotlin/java/users/get.md new file mode 100644 index 0000000000..1be96aee11 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.get( + "[USER_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/list-identities.md b/docs/examples/1.4.x/server-kotlin/java/users/list-identities.md new file mode 100644 index 0000000000..011f3a6ca2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/list-identities.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.listIdentities( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/list-logs.md b/docs/examples/1.4.x/server-kotlin/java/users/list-logs.md new file mode 100644 index 0000000000..08ace35a19 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/list-logs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.listLogs( + "[USER_ID]", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/list-memberships.md b/docs/examples/1.4.x/server-kotlin/java/users/list-memberships.md new file mode 100644 index 0000000000..503dbcb10a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/list-memberships.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.listMemberships( + "[USER_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/list-sessions.md b/docs/examples/1.4.x/server-kotlin/java/users/list-sessions.md new file mode 100644 index 0000000000..efe091fe74 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/list-sessions.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.listSessions( + "[USER_ID]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/list.md b/docs/examples/1.4.x/server-kotlin/java/users/list.md new file mode 100644 index 0000000000..d591bce79e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/list.md @@ -0,0 +1,21 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.list( + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-email-verification.md b/docs/examples/1.4.x/server-kotlin/java/users/update-email-verification.md new file mode 100644 index 0000000000..3d6d205bce --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-email-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updateEmailVerification( + "[USER_ID]", + false + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-email.md b/docs/examples/1.4.x/server-kotlin/java/users/update-email.md new file mode 100644 index 0000000000..d0e9b17c1d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-email.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updateEmail( + "[USER_ID]", + "email@example.com" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-labels.md b/docs/examples/1.4.x/server-kotlin/java/users/update-labels.md new file mode 100644 index 0000000000..e0c7bdc5b8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-labels.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updateLabels( + "[USER_ID]", + listOf() + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-name.md b/docs/examples/1.4.x/server-kotlin/java/users/update-name.md new file mode 100644 index 0000000000..e16f539bdc --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updateName( + "[USER_ID]", + "[NAME]" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-password.md b/docs/examples/1.4.x/server-kotlin/java/users/update-password.md new file mode 100644 index 0000000000..c94e6dd77b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-password.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updatePassword( + "[USER_ID]", + "" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-phone-verification.md b/docs/examples/1.4.x/server-kotlin/java/users/update-phone-verification.md new file mode 100644 index 0000000000..8c9a26d609 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-phone-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updatePhoneVerification( + "[USER_ID]", + false + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-phone.md b/docs/examples/1.4.x/server-kotlin/java/users/update-phone.md new file mode 100644 index 0000000000..4a2accb793 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-phone.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updatePhone( + "[USER_ID]", + "+12065550100" + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-prefs.md b/docs/examples/1.4.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 0000000000..b12a5d8e4f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updatePrefs( + "[USER_ID]", + mapOf( "a" to "b" ) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/java/users/update-status.md b/docs/examples/1.4.x/server-kotlin/java/users/update-status.md new file mode 100644 index 0000000000..012142cad7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +Users users = new Users(client); + +users.updateStatus( + "[USER_ID]", + false + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/create-phone-verification.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..e18d4ce13b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.createPhoneVerification() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/create-recovery.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..a219cb8196 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/create-recovery.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/create-verification.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/create-verification.md new file mode 100644 index 0000000000..33846f1dba --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/create-verification.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.createVerification( + url = "https://example.com" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-identity.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..c21ccdab4a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-identity.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.deleteIdentity( + identityId = "[IDENTITY_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-session.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-session.md new file mode 100644 index 0000000000..60aa4f2604 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.deleteSession( + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-sessions.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..a16622a526 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/delete-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.deleteSessions() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/get-prefs.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..dbbba1d98f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/get-prefs.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.getPrefs() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/get-session.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/get-session.md new file mode 100644 index 0000000000..07861109b6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/get-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.getSession( + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/get.md new file mode 100644 index 0000000000..1fb002ae24 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.get() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/list-identities.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/list-identities.md new file mode 100644 index 0000000000..c300e28f7d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/list-identities.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.listIdentities( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/list-logs.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/list-logs.md new file mode 100644 index 0000000000..daddd75843 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/list-logs.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.listLogs( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/list-sessions.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..132a5da23b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/list-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.listSessions() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-email.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-email.md new file mode 100644 index 0000000000..1127bbc2b2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-email.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updateEmail( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-name.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-name.md new file mode 100644 index 0000000000..3de89a503e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-name.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updateName( + name = "[NAME]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-password.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-password.md new file mode 100644 index 0000000000..df92d9e928 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-password.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updatePassword( + password = "", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone-verification.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..0ed51d30c2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updatePhoneVerification( + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone.md new file mode 100644 index 0000000000..9c823bb6ac --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-phone.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updatePhone( + phone = "+12065550100", + password = "password" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-prefs.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..6226269a1f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-recovery.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..1b676c1ad5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-recovery.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updateRecovery( + userId = "[USER_ID]", + secret = "[SECRET]", + password = "password", + passwordAgain = "password" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-session.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-session.md new file mode 100644 index 0000000000..bd3d28e3b8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updateSession( + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-status.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-status.md new file mode 100644 index 0000000000..3ed0627906 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-status.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updateStatus() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/account/update-verification.md b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-verification.md new file mode 100644 index 0000000000..e73e555c60 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/account/update-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val account = Account(client) + +val response = account.updateVerification( + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-browser.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..e9f6eb2919 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-browser.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = "aa", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-credit-card.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..c3413ac644 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = "amex", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-favicon.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..cd1ea0c7b3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-flag.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..a81c59ae60 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-flag.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = "af", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-image.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..09cacde6f8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-image.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-initials.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..ba46fb0d29 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-initials.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getInitials( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-q-r.md b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..c43aabcfe3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/avatars/get-q-r.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "[TEXT]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..22de12384d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-boolean-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createBooleanAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-collection.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-collection.md new file mode 100644 index 0000000000..9ba70cf2fe --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createCollection( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d410244ec8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-datetime-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDatetimeAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-document.md new file mode 100644 index 0000000000..95e5977b12 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-email-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-email-attribute.md new file mode 100644 index 0000000000..292f31f525 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-email-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEmailAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-enum-attribute.md new file mode 100644 index 0000000000..99008a479b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-enum-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEnumAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + elements = listOf(), + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-float-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-float-attribute.md new file mode 100644 index 0000000000..6814962502 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-float-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createFloatAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-index.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-index.md new file mode 100644 index 0000000000..42b3dbe7e1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-index.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIndex( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + type = "key", + attributes = listOf(), +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-integer-attribute.md new file mode 100644 index 0000000000..57b2ff66a7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-integer-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIntegerAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-ip-attribute.md new file mode 100644 index 0000000000..f941b82c9e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-ip-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIpAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..22ebc4a5c7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-relationship-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createRelationshipAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + relatedCollectionId = "[RELATED_COLLECTION_ID]", + type = "oneToOne", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-string-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-string-attribute.md new file mode 100644 index 0000000000..c5d3d52853 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-string-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createStringAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + size = 1, + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-url-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-url-attribute.md new file mode 100644 index 0000000000..8cd0731da1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create-url-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.createUrlAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/create.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create.md new file mode 100644 index 0000000000..d7d462a3ce --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/create.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.create( + databaseId = "[DATABASE_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-attribute.md new file mode 100644 index 0000000000..fef7a45cc4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-collection.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-collection.md new file mode 100644 index 0000000000..676359331a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-collection.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteCollection( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-document.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..2bf047fe4e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-index.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-index.md new file mode 100644 index 0000000000..59bd149224 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete-index.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteIndex( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete.md new file mode 100644 index 0000000000..f927901f09 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.delete( + databaseId = "[DATABASE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-attribute.md new file mode 100644 index 0000000000..4bba2dfa16 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-attribute.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.getAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-collection.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-collection.md new file mode 100644 index 0000000000..76ff9a1962 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-collection.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.getCollection( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-document.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-document.md new file mode 100644 index 0000000000..8bacaa57c2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.getDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-index.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-index.md new file mode 100644 index 0000000000..2d588dee73 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get-index.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.getIndex( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get.md new file mode 100644 index 0000000000..5584d4dd87 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.get( + databaseId = "[DATABASE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-attributes.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-attributes.md new file mode 100644 index 0000000000..4057571393 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-attributes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.listAttributes( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-collections.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-collections.md new file mode 100644 index 0000000000..f563c431a7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-collections.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.listCollections( + databaseId = "[DATABASE_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-documents.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..c081013fa0 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-documents.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.listDocuments( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-indexes.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-indexes.md new file mode 100644 index 0000000000..431d7acbff --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list-indexes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.listIndexes( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/list.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list.md new file mode 100644 index 0000000000..6ffece0bd5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/list.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.list( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..b74ad79547 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateBooleanAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + default = false +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-collection.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-collection.md new file mode 100644 index 0000000000..f6ccffef9d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateCollection( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..013e437db5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDatetimeAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + default = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-document.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-document.md new file mode 100644 index 0000000000..10ff4c4b4c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDocument( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-email-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-email-attribute.md new file mode 100644 index 0000000000..39ca4939ce --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEmailAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + default = "email@example.com" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-enum-attribute.md new file mode 100644 index 0000000000..ece9f22c76 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEnumAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + elements = listOf(), + required = false, + default = "[DEFAULT]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-float-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-float-attribute.md new file mode 100644 index 0000000000..ed9ec055e8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateFloatAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + min = 0, + max = 0, + default = 0 +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-integer-attribute.md new file mode 100644 index 0000000000..e881b01fa6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIntegerAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + min = 0, + max = 0, + default = 0 +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-ip-attribute.md new file mode 100644 index 0000000000..5ebe893ed5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIpAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + default = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..9c0ffecae6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-relationship-attribute.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateRelationshipAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-string-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-string-attribute.md new file mode 100644 index 0000000000..c8db170954 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateStringAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + default = "[DEFAULT]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-url-attribute.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-url-attribute.md new file mode 100644 index 0000000000..71d9bde848 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateUrlAttribute( + databaseId = "[DATABASE_ID]", + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + default = "https://example.com" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/databases/update.md b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update.md new file mode 100644 index 0000000000..3a4c608942 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/databases/update.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val databases = Databases(client) + +val response = databases.update( + databaseId = "[DATABASE_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-build.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-build.md new file mode 100644 index 0000000000..62f9d1addd --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-build.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.createBuild( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]", + buildId = "[BUILD_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-deployment.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-deployment.md new file mode 100644 index 0000000000..28b89a69f7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.models.InputFile +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDeployment( + functionId = "[FUNCTION_ID]", + code = InputFile.fromPath("file.png"), + activate = false, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..62bce1fde0 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-execution.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.createExecution( + functionId = "[FUNCTION_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-variable.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-variable.md new file mode 100644 index 0000000000..6b23614d11 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVariable( + functionId = "[FUNCTION_ID]", + key = "[KEY]", + value = "[VALUE]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/create.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create.md new file mode 100644 index 0000000000..fa10f995ed --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/create.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.create( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + runtime = "node-14.5", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-deployment.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-deployment.md new file mode 100644 index 0000000000..5187ba4419 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-variable.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-variable.md new file mode 100644 index 0000000000..f0fe4a3d86 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete-variable.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteVariable( + functionId = "[FUNCTION_ID]", + variableId = "[VARIABLE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete.md new file mode 100644 index 0000000000..f12095b5a8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.delete( + functionId = "[FUNCTION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/download-deployment.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/download-deployment.md new file mode 100644 index 0000000000..2388e829c9 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/download-deployment.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val result = functions.downloadDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-deployment.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-deployment.md new file mode 100644 index 0000000000..4653e61f0e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-deployment.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.getDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-execution.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..929a003a18 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-execution.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.getExecution( + functionId = "[FUNCTION_ID]", + executionId = "[EXECUTION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-variable.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-variable.md new file mode 100644 index 0000000000..ce42276921 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get-variable.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.getVariable( + functionId = "[FUNCTION_ID]", + variableId = "[VARIABLE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get.md new file mode 100644 index 0000000000..9261ab897a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.get( + functionId = "[FUNCTION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-deployments.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-deployments.md new file mode 100644 index 0000000000..3ec2c810ee --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-deployments.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.listDeployments( + functionId = "[FUNCTION_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-executions.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..5378c79dbc --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-executions.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.listExecutions( + functionId = "[FUNCTION_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-runtimes.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-runtimes.md new file mode 100644 index 0000000000..0e777cd1fe --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.listRuntimes() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-variables.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-variables.md new file mode 100644 index 0000000000..10e74534f4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list-variables.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.listVariables( + functionId = "[FUNCTION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/list.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list.md new file mode 100644 index 0000000000..a5f4f0d325 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/list.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.list( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/update-deployment.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/update-deployment.md new file mode 100644 index 0000000000..14b147384f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/update-deployment.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/update-variable.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/update-variable.md new file mode 100644 index 0000000000..1e0f3bbe5f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/update-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateVariable( + functionId = "[FUNCTION_ID]", + variableId = "[VARIABLE_ID]", + key = "[KEY]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/functions/update.md b/docs/examples/1.4.x/server-kotlin/kotlin/functions/update.md new file mode 100644 index 0000000000..72f15af42d --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/functions/update.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val functions = Functions(client) + +val response = functions.update( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + runtime = "node-14.5", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/graphql/mutation.md b/docs/examples/1.4.x/server-kotlin/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..aed06cd7a6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/graphql/mutation.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.mutation( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/graphql/query.md b/docs/examples/1.4.x/server-kotlin/kotlin/graphql/query.md new file mode 100644 index 0000000000..bd29d431c4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/graphql/query.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.query( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-antivirus.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-antivirus.md new file mode 100644 index 0000000000..e387fe0d95 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-antivirus.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getAntivirus() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-cache.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-cache.md new file mode 100644 index 0000000000..7aca9dd008 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-cache.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getCache() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-d-b.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-d-b.md new file mode 100644 index 0000000000..8e719142bb --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-d-b.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getDB() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-pub-sub.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-pub-sub.md new file mode 100644 index 0000000000..421407a831 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getPubSub() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-certificates.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-certificates.md new file mode 100644 index 0000000000..f416351705 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-certificates.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getQueueCertificates() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-functions.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-functions.md new file mode 100644 index 0000000000..b55241d8f2 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-functions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getQueueFunctions() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-logs.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-logs.md new file mode 100644 index 0000000000..fb634ec63c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-logs.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getQueueLogs() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-webhooks.md new file mode 100644 index 0000000000..bf4629d259 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue-webhooks.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getQueueWebhooks() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue.md new file mode 100644 index 0000000000..ead51857ac --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-queue.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getQueue() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-storage-local.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-storage-local.md new file mode 100644 index 0000000000..f204168bc4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-storage-local.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getStorageLocal() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get-time.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-time.md new file mode 100644 index 0000000000..35f3bb9bd6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get-time.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.getTime() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/health/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/health/get.md new file mode 100644 index 0000000000..b547be9aa5 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/health/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val health = Health(client) + +val response = health.get() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/get.md new file mode 100644 index 0000000000..1d84651fea --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.get() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-codes.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..28f02027e7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listCodes() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-continents.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..bd9ad1825b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-continents.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listContinents() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..5d3258335e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listCountriesEU() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-phones.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..e0f2ae3c6b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listCountriesPhones() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..626d38133e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-countries.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listCountries() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-currencies.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..6457056d70 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-currencies.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listCurrencies() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-languages.md b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..437b1c3fe9 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/locale/list-languages.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val locale = Locale(client) + +val response = locale.listLanguages() diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/create-bucket.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/create-bucket.md new file mode 100644 index 0000000000..27d73ffd07 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/create-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.createBucket( + bucketId = "[BUCKET_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/create-file.md new file mode 100644 index 0000000000..1bdf5e4893 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/create-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.createFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + file = InputFile.fromPath("file.png"), +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-bucket.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-bucket.md new file mode 100644 index 0000000000..3730a05298 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.deleteBucket( + bucketId = "[BUCKET_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-file.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..dabf805e8b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/delete-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.deleteFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-bucket.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-bucket.md new file mode 100644 index 0000000000..0c7fcc137c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-bucket.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.getBucket( + bucketId = "[BUCKET_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-download.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..6c3c1fb4ae --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-download.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-preview.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..372416ed12 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-view.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..4b23cfc9c6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file-view.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file.md new file mode 100644 index 0000000000..211713c7b6 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/get-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.getFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/list-buckets.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/list-buckets.md new file mode 100644 index 0000000000..8c4c7bdaac --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/list-buckets.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.listBuckets( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/list-files.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/list-files.md new file mode 100644 index 0000000000..5243ed74cc --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/list-files.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.listFiles( + bucketId = "[BUCKET_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/update-bucket.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/update-bucket.md new file mode 100644 index 0000000000..3de3b5460e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/update-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.updateBucket( + bucketId = "[BUCKET_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/storage/update-file.md b/docs/examples/1.4.x/server-kotlin/kotlin/storage/update-file.md new file mode 100644 index 0000000000..3d7fb9ab26 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/storage/update-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val storage = Storage(client) + +val response = storage.updateFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/create-membership.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..44f444bc10 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/create-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.createMembership( + teamId = "[TEAM_ID]", + roles = listOf(), + url = "https://example.com", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/create.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/create.md new file mode 100644 index 0000000000..9e080a1346 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/create.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.create( + teamId = "[TEAM_ID]", + name = "[NAME]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/delete-membership.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..16e73e4884 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/delete-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.deleteMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/delete.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/delete.md new file mode 100644 index 0000000000..c015a772c8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.delete( + teamId = "[TEAM_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/get-membership.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..4f2bed3800 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/get-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.getMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/get-prefs.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..1bfcf07f7a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/get-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val teams = Teams(client) + +val response = teams.getPrefs( + teamId = "[TEAM_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/get.md new file mode 100644 index 0000000000..402aeb1beb --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.get( + teamId = "[TEAM_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/list-memberships.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..e9eae80f0b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/list-memberships.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.listMemberships( + teamId = "[TEAM_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/list.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/list.md new file mode 100644 index 0000000000..aa10ca58fd --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/list.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.list( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership-status.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..7fa6bd837c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val teams = Teams(client) + +val response = teams.updateMembershipStatus( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + userId = "[USER_ID]", + secret = "[SECRET]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..9ca3a30f40 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.updateMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + roles = listOf() +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-name.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-name.md new file mode 100644 index 0000000000..d717c371bc --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val teams = Teams(client) + +val response = teams.updateName( + teamId = "[TEAM_ID]", + name = "[NAME]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-prefs.md b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..62fc925415 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/teams/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +val teams = Teams(client) + +val response = teams.updatePrefs( + teamId = "[TEAM_ID]", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-argon2user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-argon2user.md new file mode 100644 index 0000000000..438363aed3 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-argon2user.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createArgon2User( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-bcrypt-user.md new file mode 100644 index 0000000000..977782ce3c --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createBcryptUser( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-m-d5user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-m-d5user.md new file mode 100644 index 0000000000..6d6451f376 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createMD5User( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..c50b2c1da4 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createPHPassUser( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-s-h-a-user.md new file mode 100644 index 0000000000..708935c970 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-s-h-a-user.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createSHAUser( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d49f7db471 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createScryptModifiedUser( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", + passwordSalt = "[PASSWORD_SALT]", + passwordSaltSeparator = "[PASSWORD_SALT_SEPARATOR]", + passwordSignerKey = "[PASSWORD_SIGNER_KEY]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-user.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-user.md new file mode 100644 index 0000000000..aa006fb0db --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.createScryptUser( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", + passwordSalt = "[PASSWORD_SALT]", + passwordCpu = 0, + passwordMemory = 0, + passwordParallel = 0, + passwordLength = 0, +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/create.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/create.md new file mode 100644 index 0000000000..ae319d8cd8 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/create.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.create( + userId = "[USER_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-identity.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-identity.md new file mode 100644 index 0000000000..7b4de829c7 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-identity.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.deleteIdentity( + identityId = "[IDENTITY_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-session.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-session.md new file mode 100644 index 0000000000..f3a0264aa1 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.deleteSession( + userId = "[USER_ID]", + sessionId = "[SESSION_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-sessions.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-sessions.md new file mode 100644 index 0000000000..5c0070c027 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete-sessions.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.deleteSessions( + userId = "[USER_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/delete.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete.md new file mode 100644 index 0000000000..30ee8f3d7a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.delete( + userId = "[USER_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/get-prefs.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/get-prefs.md new file mode 100644 index 0000000000..564489c398 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/get-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.getPrefs( + userId = "[USER_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/get.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/get.md new file mode 100644 index 0000000000..fd7e4b7a1b --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.get( + userId = "[USER_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/list-identities.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-identities.md new file mode 100644 index 0000000000..0135fb1c23 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-identities.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.listIdentities( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/list-logs.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-logs.md new file mode 100644 index 0000000000..691007588e --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-logs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.listLogs( + userId = "[USER_ID]", +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/list-memberships.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-memberships.md new file mode 100644 index 0000000000..316889e894 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-memberships.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.listMemberships( + userId = "[USER_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/list-sessions.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-sessions.md new file mode 100644 index 0000000000..1d7e950425 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/list-sessions.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.listSessions( + userId = "[USER_ID]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/list.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/list.md new file mode 100644 index 0000000000..e973a26e52 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/list.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.list( +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-email-verification.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-email-verification.md new file mode 100644 index 0000000000..b4f97bbcab --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-email-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updateEmailVerification( + userId = "[USER_ID]", + emailVerification = false +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-email.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-email.md new file mode 100644 index 0000000000..c6dfaefd2f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-email.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updateEmail( + userId = "[USER_ID]", + email = "email@example.com" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-labels.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-labels.md new file mode 100644 index 0000000000..4e869f8237 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-labels.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updateLabels( + userId = "[USER_ID]", + labels = listOf() +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-name.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-name.md new file mode 100644 index 0000000000..1d46c7a8fc --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updateName( + userId = "[USER_ID]", + name = "[NAME]" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-password.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-password.md new file mode 100644 index 0000000000..f96158faa9 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-password.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updatePassword( + userId = "[USER_ID]", + password = "" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone-verification.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone-verification.md new file mode 100644 index 0000000000..909803bd94 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updatePhoneVerification( + userId = "[USER_ID]", + phoneVerification = false +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone.md new file mode 100644 index 0000000000..073dd6640a --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-phone.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updatePhone( + userId = "[USER_ID]", + number = "+12065550100" +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-prefs.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-prefs.md new file mode 100644 index 0000000000..127035ca48 --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updatePrefs( + userId = "[USER_ID]", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.4.x/server-kotlin/kotlin/users/update-status.md b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-status.md new file mode 100644 index 0000000000..5899ed360f --- /dev/null +++ b/docs/examples/1.4.x/server-kotlin/kotlin/users/update-status.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +val client = Client(context) + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +val users = Users(client) + +val response = users.updateStatus( + userId = "[USER_ID]", + status = false +) diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-nodejs/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..f381495f24 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/create-phone-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.createPhoneVerification(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/1.4.x/server-nodejs/examples/account/create-recovery.md new file mode 100644 index 0000000000..f4c5ae98de --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/create-recovery.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/create-verification.md b/docs/examples/1.4.x/server-nodejs/examples/account/create-verification.md new file mode 100644 index 0000000000..04585621eb --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/create-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/delete-identity.md b/docs/examples/1.4.x/server-nodejs/examples/account/delete-identity.md new file mode 100644 index 0000000000..2900aa1716 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/delete-identity.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/delete-session.md b/docs/examples/1.4.x/server-nodejs/examples/account/delete-session.md new file mode 100644 index 0000000000..74f3869859 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/delete-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-nodejs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..0968c30b92 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/delete-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.deleteSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/get-prefs.md b/docs/examples/1.4.x/server-nodejs/examples/account/get-prefs.md new file mode 100644 index 0000000000..8bd5d97c25 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/get-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.getPrefs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/get-session.md b/docs/examples/1.4.x/server-nodejs/examples/account/get-session.md new file mode 100644 index 0000000000..3abb677fbe --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/get-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/get.md b/docs/examples/1.4.x/server-nodejs/examples/account/get.md new file mode 100644 index 0000000000..d4f4066fb1 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/list-identities.md b/docs/examples/1.4.x/server-nodejs/examples/account/list-identities.md new file mode 100644 index 0000000000..fa2013bbf6 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/list-identities.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.listIdentities(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/list-logs.md b/docs/examples/1.4.x/server-nodejs/examples/account/list-logs.md new file mode 100644 index 0000000000..890e0d12d3 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/list-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.listLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/list-sessions.md b/docs/examples/1.4.x/server-nodejs/examples/account/list-sessions.md new file mode 100644 index 0000000000..68e97ada31 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/list-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.listSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-email.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-email.md new file mode 100644 index 0000000000..388e2581bb --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-email.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-name.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-name.md new file mode 100644 index 0000000000..0984652712 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-name.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-password.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-password.md new file mode 100644 index 0000000000..b46500fd3c --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-password.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updatePassword(''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..1aa4042f36 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-phone-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-phone.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-phone.md new file mode 100644 index 0000000000..37124d81aa --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-phone.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updatePhone('+12065550100', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-prefs.md new file mode 100644 index 0000000000..6948706abb --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-recovery.md new file mode 100644 index 0000000000..74f70f59c7 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-recovery.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-session.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-session.md new file mode 100644 index 0000000000..b0b932524f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-status.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-status.md new file mode 100644 index 0000000000..277243b824 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updateStatus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/account/update-verification.md b/docs/examples/1.4.x/server-nodejs/examples/account/update-verification.md new file mode 100644 index 0000000000..6a7fbbf99c --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/account/update-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const account = new sdk.Account(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..c05595ad67 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-browser.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getBrowser('aa'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..8fbd37d29a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-credit-card.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getCreditCard('amex'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..2924e394a0 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-favicon.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getFavicon('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..50d611c399 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-flag.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getFlag('af'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-image.md new file mode 100644 index 0000000000..3b2bb517d1 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-image.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getImage('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..4afda6f547 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-initials.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getInitials(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d2d24e2055 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/avatars/get-q-r.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = avatars.getQR('[TEXT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..12a70102ca --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-collection.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-collection.md new file mode 100644 index 0000000000..13ec4e037f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..70609a84e7 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-datetime-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-document.md new file mode 100644 index 0000000000..f5fa7a50a6 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..2229dfe7f9 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-email-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..cd9daca603 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..a12c4f4420 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-index.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-index.md new file mode 100644 index 0000000000..66c3e519fe --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-index.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createIndex('[DATABASE_ID]', '[COLLECTION_ID]', '', 'key', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..fa693d28de --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..1e8985a2bd --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-ip-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..f680d1c03a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-relationship-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '[RELATED_COLLECTION_ID]', 'oneToOne'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..bfb4fbfc3f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', 1, false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..e6a585f76b --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create-url-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.createUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/create.md b/docs/examples/1.4.x/server-nodejs/examples/databases/create.md new file mode 100644 index 0000000000..4e04f026bd --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.create('[DATABASE_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..3c65f62ef5 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.deleteAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-collection.md new file mode 100644 index 0000000000..047fa26846 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.deleteCollection('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/delete-document.md b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-document.md new file mode 100644 index 0000000000..a6f3fa58ca --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.deleteDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/delete-index.md b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-index.md new file mode 100644 index 0000000000..42d73104a0 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/delete-index.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.deleteIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/delete.md b/docs/examples/1.4.x/server-nodejs/examples/databases/delete.md new file mode 100644 index 0000000000..3f39965820 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.delete('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/get-attribute.md new file mode 100644 index 0000000000..df6c665b75 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/get-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.getAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/get-collection.md b/docs/examples/1.4.x/server-nodejs/examples/databases/get-collection.md new file mode 100644 index 0000000000..ea4ed423e8 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/get-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.getCollection('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/get-document.md b/docs/examples/1.4.x/server-nodejs/examples/databases/get-document.md new file mode 100644 index 0000000000..ac07b968ae --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/get-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.getDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/get-index.md b/docs/examples/1.4.x/server-nodejs/examples/databases/get-index.md new file mode 100644 index 0000000000..c3a3d168c5 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/get-index.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.getIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/get.md b/docs/examples/1.4.x/server-nodejs/examples/databases/get.md new file mode 100644 index 0000000000..133f496b2e --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.get('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-nodejs/examples/databases/list-attributes.md new file mode 100644 index 0000000000..b1a494b110 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/list-attributes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.listAttributes('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/list-collections.md b/docs/examples/1.4.x/server-nodejs/examples/databases/list-collections.md new file mode 100644 index 0000000000..c1d9fd3421 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/list-collections.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.listCollections('[DATABASE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/list-documents.md b/docs/examples/1.4.x/server-nodejs/examples/databases/list-documents.md new file mode 100644 index 0000000000..bf0b9156bf --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/list-documents.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.listDocuments('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-nodejs/examples/databases/list-indexes.md new file mode 100644 index 0000000000..57787f1d3e --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/list-indexes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.listIndexes('[DATABASE_ID]', '[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/list.md b/docs/examples/1.4.x/server-nodejs/examples/databases/list.md new file mode 100644 index 0000000000..5652d1e032 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..3bdfc04e5f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-collection.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-collection.md new file mode 100644 index 0000000000..db74a7b9eb --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..8b602d434f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-datetime-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-document.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-document.md new file mode 100644 index 0000000000..ca3cdb85e7 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..a96e89853b --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-email-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'email@example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..b0dfbb11df --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false, '[DEFAULT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..2c0672dd99 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..8016aac600 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..8eab99aa35 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-ip-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..699148f882 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-relationship-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..c7e6fe9b7f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '[DEFAULT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..d8cb42aafd --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update-url-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.updateUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/databases/update.md b/docs/examples/1.4.x/server-nodejs/examples/databases/update.md new file mode 100644 index 0000000000..7abe11bf80 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/databases/update.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const databases = new sdk.Databases(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = databases.update('[DATABASE_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/create-build.md b/docs/examples/1.4.x/server-nodejs/examples/functions/create-build.md new file mode 100644 index 0000000000..fe9751e73b --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/create-build.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.createBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-nodejs/examples/functions/create-deployment.md new file mode 100644 index 0000000000..6d14142f2f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/create-deployment.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.createDeployment('[FUNCTION_ID]', InputFile.fromPath('/path/to/file.png', 'file.png'), false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.4.x/server-nodejs/examples/functions/create-execution.md new file mode 100644 index 0000000000..dc182fdd44 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/create-variable.md b/docs/examples/1.4.x/server-nodejs/examples/functions/create-variable.md new file mode 100644 index 0000000000..80f3fd0257 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/create-variable.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.createVariable('[FUNCTION_ID]', '[KEY]', '[VALUE]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/create.md b/docs/examples/1.4.x/server-nodejs/examples/functions/create.md new file mode 100644 index 0000000000..8600f34b82 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-nodejs/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..5affdf18b9 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/delete-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-nodejs/examples/functions/delete-variable.md new file mode 100644 index 0000000000..2a075fdea7 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/delete-variable.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.deleteVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/delete.md b/docs/examples/1.4.x/server-nodejs/examples/functions/delete.md new file mode 100644 index 0000000000..d17f01361e --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-nodejs/examples/functions/download-deployment.md new file mode 100644 index 0000000000..d8bd913cc8 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/download-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.downloadDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-nodejs/examples/functions/get-deployment.md new file mode 100644 index 0000000000..d67ce4647a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/get-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/1.4.x/server-nodejs/examples/functions/get-execution.md new file mode 100644 index 0000000000..bbf0788138 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/get-execution.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/get-variable.md b/docs/examples/1.4.x/server-nodejs/examples/functions/get-variable.md new file mode 100644 index 0000000000..11ce7e2836 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/get-variable.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.getVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/get.md b/docs/examples/1.4.x/server-nodejs/examples/functions/get.md new file mode 100644 index 0000000000..54ea4812b8 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-nodejs/examples/functions/list-deployments.md new file mode 100644 index 0000000000..4819410875 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/list-deployments.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.listDeployments('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/1.4.x/server-nodejs/examples/functions/list-executions.md new file mode 100644 index 0000000000..f9e77a5d32 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/list-executions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-nodejs/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..d471861374 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/list-runtimes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.listRuntimes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/list-variables.md b/docs/examples/1.4.x/server-nodejs/examples/functions/list-variables.md new file mode 100644 index 0000000000..e193b2b1ba --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/list-variables.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.listVariables('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/list.md b/docs/examples/1.4.x/server-nodejs/examples/functions/list.md new file mode 100644 index 0000000000..4f7b45e26a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-nodejs/examples/functions/update-deployment.md new file mode 100644 index 0000000000..25f0e79983 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/update-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/update-variable.md b/docs/examples/1.4.x/server-nodejs/examples/functions/update-variable.md new file mode 100644 index 0000000000..86e9a698f5 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/update-variable.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.updateVariable('[FUNCTION_ID]', '[VARIABLE_ID]', '[KEY]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/functions/update.md b/docs/examples/1.4.x/server-nodejs/examples/functions/update.md new file mode 100644 index 0000000000..5ab5b1bd8b --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/functions/update.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const functions = new sdk.Functions(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/graphql/mutation.md b/docs/examples/1.4.x/server-nodejs/examples/graphql/mutation.md new file mode 100644 index 0000000000..6f9bed8426 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/graphql/mutation.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const graphql = new sdk.Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = graphql.mutation({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/graphql/query.md b/docs/examples/1.4.x/server-nodejs/examples/graphql/query.md new file mode 100644 index 0000000000..35cd4060cc --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/graphql/query.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const graphql = new sdk.Graphql(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = graphql.query({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-antivirus.md new file mode 100644 index 0000000000..b6e5e78a30 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-antivirus.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getAntivirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-cache.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-cache.md new file mode 100644 index 0000000000..8171c40fc6 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-cache.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getCache(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-d-b.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-d-b.md new file mode 100644 index 0000000000..ef1739fff0 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-d-b.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getDB(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..b690239910 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-pub-sub.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getPubSub(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..38dadde1b2 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-certificates.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..bc8668eda6 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-functions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..918a9d9e6c --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..acf023a188 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-queue.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue.md new file mode 100644 index 0000000000..4caafecfa4 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-queue.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getQueue(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..76e51489fd --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-storage-local.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get-time.md b/docs/examples/1.4.x/server-nodejs/examples/health/get-time.md new file mode 100644 index 0000000000..f44836ac3c --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get-time.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.getTime(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/health/get.md b/docs/examples/1.4.x/server-nodejs/examples/health/get.md new file mode 100644 index 0000000000..a66b25631f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/health/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = health.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/get.md b/docs/examples/1.4.x/server-nodejs/examples/locale/get.md new file mode 100644 index 0000000000..31d90c6f11 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-codes.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-codes.md new file mode 100644 index 0000000000..aa95dafc71 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-codes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listCodes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-continents.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-continents.md new file mode 100644 index 0000000000..ffe54d34da --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-continents.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listContinents(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..f9aaff666a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-e-u.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listCountriesEU(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..fdd2436dc0 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries-phones.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listCountriesPhones(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries.md new file mode 100644 index 0000000000..429e188776 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-countries.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listCountries(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-currencies.md new file mode 100644 index 0000000000..12d82fb70f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-currencies.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listCurrencies(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/locale/list-languages.md b/docs/examples/1.4.x/server-nodejs/examples/locale/list-languages.md new file mode 100644 index 0000000000..8ea2b40afc --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/locale/list-languages.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const locale = new sdk.Locale(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = locale.listLanguages(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-nodejs/examples/storage/create-bucket.md new file mode 100644 index 0000000000..9093b7c9a6 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/create-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.createBucket('[BUCKET_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/create-file.md b/docs/examples/1.4.x/server-nodejs/examples/storage/create-file.md new file mode 100644 index 0000000000..664005e273 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/create-file.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', InputFile.fromPath('/path/to/file.png', 'file.png')); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-nodejs/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..84486c68dc --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/delete-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.deleteBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/1.4.x/server-nodejs/examples/storage/delete-file.md new file mode 100644 index 0000000000..c4d451c63f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/delete-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-nodejs/examples/storage/get-bucket.md new file mode 100644 index 0000000000..d0fbb94bbc --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/get-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.getBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..1503d102ba --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-download.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..19d34495ba --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-preview.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..1affab8bc0 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file-view.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/get-file.md b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file.md new file mode 100644 index 0000000000..ceba42ce1e --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/get-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-nodejs/examples/storage/list-buckets.md new file mode 100644 index 0000000000..9945febb42 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/list-buckets.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.listBuckets(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/list-files.md b/docs/examples/1.4.x/server-nodejs/examples/storage/list-files.md new file mode 100644 index 0000000000..fea4bae61f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/list-files.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-nodejs/examples/storage/update-bucket.md new file mode 100644 index 0000000000..32df1f18d8 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/update-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.updateBucket('[BUCKET_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/storage/update-file.md b/docs/examples/1.4.x/server-nodejs/examples/storage/update-file.md new file mode 100644 index 0000000000..042a164501 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/storage/update-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const storage = new sdk.Storage(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/1.4.x/server-nodejs/examples/teams/create-membership.md new file mode 100644 index 0000000000..34d843d934 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/create.md b/docs/examples/1.4.x/server-nodejs/examples/teams/create.md new file mode 100644 index 0000000000..5552f829f9 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-nodejs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..ef72e63138 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/delete-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/delete.md b/docs/examples/1.4.x/server-nodejs/examples/teams/delete.md new file mode 100644 index 0000000000..6f1dfaa61d --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/1.4.x/server-nodejs/examples/teams/get-membership.md new file mode 100644 index 0000000000..d31aa9a8b6 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/get-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-nodejs/examples/teams/get-prefs.md new file mode 100644 index 0000000000..0ac9e95ff1 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/get-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = teams.getPrefs('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/get.md b/docs/examples/1.4.x/server-nodejs/examples/teams/get.md new file mode 100644 index 0000000000..0d34943242 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-nodejs/examples/teams/list-memberships.md new file mode 100644 index 0000000000..ca25bcbd25 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/list-memberships.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.listMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/list.md b/docs/examples/1.4.x/server-nodejs/examples/teams/list.md new file mode 100644 index 0000000000..8610bc7dc4 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-nodejs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..6c46e786a0 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/update-membership-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/update-membership.md b/docs/examples/1.4.x/server-nodejs/examples/teams/update-membership.md new file mode 100644 index 0000000000..d5ba30a938 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/update-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.updateMembership('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/update-name.md b/docs/examples/1.4.x/server-nodejs/examples/teams/update-name.md new file mode 100644 index 0000000000..962e18f168 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/update-name.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = teams.updateName('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-nodejs/examples/teams/update-prefs.md new file mode 100644 index 0000000000..eeeed6c7eb --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/teams/update-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const teams = new sdk.Teams(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +const promise = teams.updatePrefs('[TEAM_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-argon2user.md new file mode 100644 index 0000000000..2762cc0112 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-argon2user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createArgon2User('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..7bbdd3b883 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-bcrypt-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createBcryptUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..0661743da2 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-m-d5user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createMD5User('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..37bd7e70c5 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-p-h-pass-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createPHPassUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..1d0502598b --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-s-h-a-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createSHAUser('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..5a0153ec9a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createScryptModifiedUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', '[PASSWORD_SALT_SEPARATOR]', '[PASSWORD_SIGNER_KEY]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..83ec8d3d78 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.createScryptUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', null, null, null, null); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/create.md b/docs/examples/1.4.x/server-nodejs/examples/users/create.md new file mode 100644 index 0000000000..65ab3fae41 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.create('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/delete-identity.md b/docs/examples/1.4.x/server-nodejs/examples/users/delete-identity.md new file mode 100644 index 0000000000..c3acfa9eca --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/delete-identity.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.deleteIdentity('[IDENTITY_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/delete-session.md b/docs/examples/1.4.x/server-nodejs/examples/users/delete-session.md new file mode 100644 index 0000000000..18617ba2e8 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/delete-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-nodejs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..c804d7ddcf --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/delete-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/delete.md b/docs/examples/1.4.x/server-nodejs/examples/users/delete.md new file mode 100644 index 0000000000..53606a7a0a --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.delete('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/1.4.x/server-nodejs/examples/users/get-prefs.md new file mode 100644 index 0000000000..c60db8ac77 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/get-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/get.md b/docs/examples/1.4.x/server-nodejs/examples/users/get.md new file mode 100644 index 0000000000..3bad599d4d --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/list-identities.md b/docs/examples/1.4.x/server-nodejs/examples/users/list-identities.md new file mode 100644 index 0000000000..36a71b7051 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/list-identities.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.listIdentities(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/list-logs.md b/docs/examples/1.4.x/server-nodejs/examples/users/list-logs.md new file mode 100644 index 0000000000..0f76626c6e --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/list-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.listLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/list-memberships.md b/docs/examples/1.4.x/server-nodejs/examples/users/list-memberships.md new file mode 100644 index 0000000000..81e0c4bc8f --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/list-memberships.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.listMemberships('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/list-sessions.md b/docs/examples/1.4.x/server-nodejs/examples/users/list-sessions.md new file mode 100644 index 0000000000..b44341bcbe --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/list-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.listSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/list.md b/docs/examples/1.4.x/server-nodejs/examples/users/list.md new file mode 100644 index 0000000000..a9ba208d2e --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-email-verification.md new file mode 100644 index 0000000000..29c3e26593 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-email-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updateEmailVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-email.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-email.md new file mode 100644 index 0000000000..5cef6fb5ec --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-email.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updateEmail('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-labels.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-labels.md new file mode 100644 index 0000000000..d727bf1ed2 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-labels.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updateLabels('[USER_ID]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-name.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-name.md new file mode 100644 index 0000000000..ea33b7ed51 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-name.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updateName('[USER_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-password.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-password.md new file mode 100644 index 0000000000..f08a5990f4 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-password.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updatePassword('[USER_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..e6a95f93f8 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-phone-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updatePhoneVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-phone.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-phone.md new file mode 100644 index 0000000000..8db9863c00 --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-phone.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updatePhone('[USER_ID]', '+12065550100'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-prefs.md new file mode 100644 index 0000000000..75f1a4298c --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-nodejs/examples/users/update-status.md b/docs/examples/1.4.x/server-nodejs/examples/users/update-status.md new file mode 100644 index 0000000000..ac52d732ea --- /dev/null +++ b/docs/examples/1.4.x/server-nodejs/examples/users/update-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const users = new sdk.Users(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +const promise = users.updateStatus('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-php/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..1c41a30ce8 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/create-phone-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->createPhoneVerification(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/create-recovery.md b/docs/examples/1.4.x/server-php/examples/account/create-recovery.md new file mode 100644 index 0000000000..8ca78fc37b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->createRecovery('email@example.com', 'https://example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/create-verification.md b/docs/examples/1.4.x/server-php/examples/account/create-verification.md new file mode 100644 index 0000000000..92fb38151c --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/create-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->createVerification('https://example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/delete-identity.md b/docs/examples/1.4.x/server-php/examples/account/delete-identity.md new file mode 100644 index 0000000000..0b509afdc4 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/delete-identity.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->deleteIdentity('[IDENTITY_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/delete-session.md b/docs/examples/1.4.x/server-php/examples/account/delete-session.md new file mode 100644 index 0000000000..51bf3e2d41 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/delete-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->deleteSession('[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-php/examples/account/delete-sessions.md new file mode 100644 index 0000000000..bf3bc2a300 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/delete-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->deleteSessions(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/get-prefs.md b/docs/examples/1.4.x/server-php/examples/account/get-prefs.md new file mode 100644 index 0000000000..a91b888723 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/get-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->getPrefs(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/get-session.md b/docs/examples/1.4.x/server-php/examples/account/get-session.md new file mode 100644 index 0000000000..9e2341ce08 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/get-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->getSession('[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/get.md b/docs/examples/1.4.x/server-php/examples/account/get.md new file mode 100644 index 0000000000..4333bf2e73 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->get(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/list-identities.md b/docs/examples/1.4.x/server-php/examples/account/list-identities.md new file mode 100644 index 0000000000..c522a15a3e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/list-identities.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->listIdentities(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/list-logs.md b/docs/examples/1.4.x/server-php/examples/account/list-logs.md new file mode 100644 index 0000000000..62bc86d668 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/list-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->listLogs(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/list-sessions.md b/docs/examples/1.4.x/server-php/examples/account/list-sessions.md new file mode 100644 index 0000000000..7942a3de2a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/list-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->listSessions(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-email.md b/docs/examples/1.4.x/server-php/examples/account/update-email.md new file mode 100644 index 0000000000..a7ac5ede7d --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-email.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateEmail('email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-name.md b/docs/examples/1.4.x/server-php/examples/account/update-name.md new file mode 100644 index 0000000000..21bac94900 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-name.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateName('[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-password.md b/docs/examples/1.4.x/server-php/examples/account/update-password.md new file mode 100644 index 0000000000..47e4c96695 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-password.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updatePassword(''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-php/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..02458727a5 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updatePhoneVerification('[USER_ID]', '[SECRET]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-phone.md b/docs/examples/1.4.x/server-php/examples/account/update-phone.md new file mode 100644 index 0000000000..eaa1898512 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-phone.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updatePhone('+12065550100', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-prefs.md b/docs/examples/1.4.x/server-php/examples/account/update-prefs.md new file mode 100644 index 0000000000..96d0be5781 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updatePrefs([]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-recovery.md b/docs/examples/1.4.x/server-php/examples/account/update-recovery.md new file mode 100644 index 0000000000..379b219e6d --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-session.md b/docs/examples/1.4.x/server-php/examples/account/update-session.md new file mode 100644 index 0000000000..462be6b914 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateSession('[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-status.md b/docs/examples/1.4.x/server-php/examples/account/update-status.md new file mode 100644 index 0000000000..b1a1f2c8ec --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateStatus(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/account/update-verification.md b/docs/examples/1.4.x/server-php/examples/account/update-verification.md new file mode 100644 index 0000000000..ad583a422e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/account/update-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateVerification('[USER_ID]', '[SECRET]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-php/examples/avatars/get-browser.md new file mode 100644 index 0000000000..362106f645 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getBrowser('aa'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-php/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..c85ebeac2e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getCreditCard('amex'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-php/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..088524e051 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-favicon.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getFavicon('https://example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-php/examples/avatars/get-flag.md new file mode 100644 index 0000000000..2f2705b61f --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getFlag('af'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-image.md b/docs/examples/1.4.x/server-php/examples/avatars/get-image.md new file mode 100644 index 0000000000..d576232a42 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getImage('https://example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-php/examples/avatars/get-initials.md new file mode 100644 index 0000000000..4e924c7062 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getInitials(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-php/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..fde6e35b77 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getQR('[TEXT]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..17c92241b4 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-boolean-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-collection.md b/docs/examples/1.4.x/server-php/examples/databases/create-collection.md new file mode 100644 index 0000000000..2fd5fb61c0 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..284163c266 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-datetime-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-document.md b/docs/examples/1.4.x/server-php/examples/databases/create-document.md new file mode 100644 index 0000000000..509160b9ad --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', []); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..df68be7fb0 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-email-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..c469679fd7 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-enum-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..c182d0a774 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-float-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-index.md b/docs/examples/1.4.x/server-php/examples/databases/create-index.md new file mode 100644 index 0000000000..6ecd4cc58b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-index.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createIndex('[DATABASE_ID]', '[COLLECTION_ID]', '', 'key', []); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..d86ca7056b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-integer-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..823fa99482 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-ip-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..4840a66937 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-relationship-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '[RELATED_COLLECTION_ID]', 'oneToOne'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..50abd0a18d --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-string-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', 1, false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..5520cb1334 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create-url-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->createUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/create.md b/docs/examples/1.4.x/server-php/examples/databases/create.md new file mode 100644 index 0000000000..16176b9b40 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->create('[DATABASE_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..d89c7de4f7 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->deleteAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-php/examples/databases/delete-collection.md new file mode 100644 index 0000000000..29c627bbf0 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->deleteCollection('[DATABASE_ID]', '[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/delete-document.md b/docs/examples/1.4.x/server-php/examples/databases/delete-document.md new file mode 100644 index 0000000000..9d5f1f0d51 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->deleteDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/delete-index.md b/docs/examples/1.4.x/server-php/examples/databases/delete-index.md new file mode 100644 index 0000000000..073aa3a82e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->deleteIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/delete.md b/docs/examples/1.4.x/server-php/examples/databases/delete.md new file mode 100644 index 0000000000..3dab79bc99 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->delete('[DATABASE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/get-attribute.md new file mode 100644 index 0000000000..c286a7692a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->getAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/get-collection.md b/docs/examples/1.4.x/server-php/examples/databases/get-collection.md new file mode 100644 index 0000000000..7cc578df8d --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/get-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->getCollection('[DATABASE_ID]', '[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/get-document.md b/docs/examples/1.4.x/server-php/examples/databases/get-document.md new file mode 100644 index 0000000000..7637e035e2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/get-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->getDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/get-index.md b/docs/examples/1.4.x/server-php/examples/databases/get-index.md new file mode 100644 index 0000000000..a674a5935e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/get-index.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->getIndex('[DATABASE_ID]', '[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/get.md b/docs/examples/1.4.x/server-php/examples/databases/get.md new file mode 100644 index 0000000000..adc415f9a5 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->get('[DATABASE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-php/examples/databases/list-attributes.md new file mode 100644 index 0000000000..424c4b2405 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->listAttributes('[DATABASE_ID]', '[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/list-collections.md b/docs/examples/1.4.x/server-php/examples/databases/list-collections.md new file mode 100644 index 0000000000..3f311f3138 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->listCollections('[DATABASE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/list-documents.md b/docs/examples/1.4.x/server-php/examples/databases/list-documents.md new file mode 100644 index 0000000000..c9a6bbe4ff --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->listDocuments('[DATABASE_ID]', '[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-php/examples/databases/list-indexes.md new file mode 100644 index 0000000000..733d20b933 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->listIndexes('[DATABASE_ID]', '[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/list.md b/docs/examples/1.4.x/server-php/examples/databases/list.md new file mode 100644 index 0000000000..45963718d3 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->list(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..9e8b8699e1 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-boolean-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-collection.md b/docs/examples/1.4.x/server-php/examples/databases/update-collection.md new file mode 100644 index 0000000000..878bf20986 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..26214fb785 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-datetime-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-document.md b/docs/examples/1.4.x/server-php/examples/databases/update-document.md new file mode 100644 index 0000000000..796e4600eb --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..7278881e3b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-email-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'email@example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..a77211b0f7 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-enum-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false, '[DEFAULT]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..e73793e1fd --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-float-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..1cff205200 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-integer-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..bb49d89c39 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-ip-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..b68025b84c --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateRelationshipAttribute('[DATABASE_ID]', '[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..775d0fa2be --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-string-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '[DEFAULT]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-php/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..6d4845e7eb --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update-url-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->updateUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'https://example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/databases/update.md b/docs/examples/1.4.x/server-php/examples/databases/update.md new file mode 100644 index 0000000000..db1ae7688e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/databases/update.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$databases = new Databases($client); + +$result = $databases->update('[DATABASE_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/create-build.md b/docs/examples/1.4.x/server-php/examples/functions/create-build.md new file mode 100644 index 0000000000..ac66cc2eb2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/create-build.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-php/examples/functions/create-deployment.md new file mode 100644 index 0000000000..b219b509de --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createDeployment('[FUNCTION_ID]', InputFile::withPath('file.png'), false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/create-execution.md b/docs/examples/1.4.x/server-php/examples/functions/create-execution.md new file mode 100644 index 0000000000..038126a728 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/create-execution.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createExecution('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/create-variable.md b/docs/examples/1.4.x/server-php/examples/functions/create-variable.md new file mode 100644 index 0000000000..f09e61861e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createVariable('[FUNCTION_ID]', '[KEY]', '[VALUE]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/create.md b/docs/examples/1.4.x/server-php/examples/functions/create.md new file mode 100644 index 0000000000..22744b7584 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->create('[FUNCTION_ID]', '[NAME]', 'node-14.5'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-php/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..7227cd995f --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-php/examples/functions/delete-variable.md new file mode 100644 index 0000000000..a457846492 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->deleteVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/delete.md b/docs/examples/1.4.x/server-php/examples/functions/delete.md new file mode 100644 index 0000000000..d06c732f57 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->delete('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-php/examples/functions/download-deployment.md new file mode 100644 index 0000000000..d7a6d55e2a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/download-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->downloadDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-php/examples/functions/get-deployment.md new file mode 100644 index 0000000000..4c4fe49eb3 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/get-execution.md b/docs/examples/1.4.x/server-php/examples/functions/get-execution.md new file mode 100644 index 0000000000..ff59dc1cfe --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/get-variable.md b/docs/examples/1.4.x/server-php/examples/functions/get-variable.md new file mode 100644 index 0000000000..e80b8f9fc0 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/get-variable.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getVariable('[FUNCTION_ID]', '[VARIABLE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/get.md b/docs/examples/1.4.x/server-php/examples/functions/get.md new file mode 100644 index 0000000000..aef5806259 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->get('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-php/examples/functions/list-deployments.md new file mode 100644 index 0000000000..366e5fdc71 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listDeployments('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/list-executions.md b/docs/examples/1.4.x/server-php/examples/functions/list-executions.md new file mode 100644 index 0000000000..34a80ad434 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/list-executions.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listExecutions('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-php/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..b35dadfec9 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/list-runtimes.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listRuntimes(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/list-variables.md b/docs/examples/1.4.x/server-php/examples/functions/list-variables.md new file mode 100644 index 0000000000..cf74289157 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/list-variables.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listVariables('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/list.md b/docs/examples/1.4.x/server-php/examples/functions/list.md new file mode 100644 index 0000000000..f57875572e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->list(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-php/examples/functions/update-deployment.md new file mode 100644 index 0000000000..b5f09cd018 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/update-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/update-variable.md b/docs/examples/1.4.x/server-php/examples/functions/update-variable.md new file mode 100644 index 0000000000..4eb52d94d3 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->updateVariable('[FUNCTION_ID]', '[VARIABLE_ID]', '[KEY]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/functions/update.md b/docs/examples/1.4.x/server-php/examples/functions/update.md new file mode 100644 index 0000000000..f76fbfa4d7 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/functions/update.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->update('[FUNCTION_ID]', '[NAME]', 'node-14.5'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/graphql/mutation.md b/docs/examples/1.4.x/server-php/examples/graphql/mutation.md new file mode 100644 index 0000000000..5622f7f269 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/graphql/mutation.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$graphql = new Graphql($client); + +$result = $graphql->mutation([]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/graphql/query.md b/docs/examples/1.4.x/server-php/examples/graphql/query.md new file mode 100644 index 0000000000..3ca1d940c4 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/graphql/query.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$graphql = new Graphql($client); + +$result = $graphql->query([]); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-php/examples/health/get-antivirus.md new file mode 100644 index 0000000000..4f1483514b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-antivirus.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getAntivirus(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-cache.md b/docs/examples/1.4.x/server-php/examples/health/get-cache.md new file mode 100644 index 0000000000..3d1b19b3ef --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-cache.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getCache(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-d-b.md b/docs/examples/1.4.x/server-php/examples/health/get-d-b.md new file mode 100644 index 0000000000..c03ba23723 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-d-b.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getDB(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-php/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..721b5c2474 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-pub-sub.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getPubSub(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-php/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..76236de7b5 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-queue-certificates.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueCertificates(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-php/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..31f65de1d1 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-queue-functions.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueFunctions(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-php/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..ff1adb2a41 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-queue-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueLogs(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-php/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..99592bcfac --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-queue-webhooks.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueWebhooks(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-queue.md b/docs/examples/1.4.x/server-php/examples/health/get-queue.md new file mode 100644 index 0000000000..9feb1ad8e2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-queue.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueue(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-php/examples/health/get-storage-local.md new file mode 100644 index 0000000000..55212c36ae --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-storage-local.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getStorageLocal(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get-time.md b/docs/examples/1.4.x/server-php/examples/health/get-time.md new file mode 100644 index 0000000000..5410124786 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get-time.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getTime(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/health/get.md b/docs/examples/1.4.x/server-php/examples/health/get.md new file mode 100644 index 0000000000..62cab8acf2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/health/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->get(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/get.md b/docs/examples/1.4.x/server-php/examples/locale/get.md new file mode 100644 index 0000000000..c4910463c5 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->get(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-codes.md b/docs/examples/1.4.x/server-php/examples/locale/list-codes.md new file mode 100644 index 0000000000..55207ce32d --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-codes.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listCodes(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-continents.md b/docs/examples/1.4.x/server-php/examples/locale/list-continents.md new file mode 100644 index 0000000000..9cd8fb1399 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-continents.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listContinents(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-php/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..1f2ef98c96 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-countries-e-u.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listCountriesEU(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-php/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..6f8acb7467 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-countries-phones.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listCountriesPhones(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-countries.md b/docs/examples/1.4.x/server-php/examples/locale/list-countries.md new file mode 100644 index 0000000000..28c518e82a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-countries.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listCountries(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-php/examples/locale/list-currencies.md new file mode 100644 index 0000000000..37784f3d1e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-currencies.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listCurrencies(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/locale/list-languages.md b/docs/examples/1.4.x/server-php/examples/locale/list-languages.md new file mode 100644 index 0000000000..8b4f082cb0 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/locale/list-languages.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->listLanguages(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-php/examples/storage/create-bucket.md new file mode 100644 index 0000000000..bf54c22a47 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/create-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->createBucket('[BUCKET_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/create-file.md b/docs/examples/1.4.x/server-php/examples/storage/create-file.md new file mode 100644 index 0000000000..e2cfce7ae9 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/create-file.md @@ -0,0 +1,17 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->createFile('[BUCKET_ID]', '[FILE_ID]', InputFile::withPath('file.png')); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-php/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..b3659b6276 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/delete-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->deleteBucket('[BUCKET_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/delete-file.md b/docs/examples/1.4.x/server-php/examples/storage/delete-file.md new file mode 100644 index 0000000000..00db8551b3 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->deleteFile('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-php/examples/storage/get-bucket.md new file mode 100644 index 0000000000..d4d152aff4 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/get-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getBucket('[BUCKET_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-php/examples/storage/get-file-download.md new file mode 100644 index 0000000000..0c7fefda37 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFileDownload('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-php/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c1b91e5c29 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/get-file-preview.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFilePreview('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-php/examples/storage/get-file-view.md new file mode 100644 index 0000000000..f527c1b744 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFileView('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/get-file.md b/docs/examples/1.4.x/server-php/examples/storage/get-file.md new file mode 100644 index 0000000000..cb56c96a42 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/get-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFile('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-php/examples/storage/list-buckets.md new file mode 100644 index 0000000000..b92dc82bcb --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/list-buckets.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->listBuckets(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/list-files.md b/docs/examples/1.4.x/server-php/examples/storage/list-files.md new file mode 100644 index 0000000000..e0b79186e4 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/list-files.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->listFiles('[BUCKET_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-php/examples/storage/update-bucket.md new file mode 100644 index 0000000000..5e46dfc83b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/update-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->updateBucket('[BUCKET_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/storage/update-file.md b/docs/examples/1.4.x/server-php/examples/storage/update-file.md new file mode 100644 index 0000000000..1d3e01e99a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/storage/update-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->updateFile('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/create-membership.md b/docs/examples/1.4.x/server-php/examples/teams/create-membership.md new file mode 100644 index 0000000000..34f642ea11 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->createMembership('[TEAM_ID]', [], 'https://example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/create.md b/docs/examples/1.4.x/server-php/examples/teams/create.md new file mode 100644 index 0000000000..e5efe49b30 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->create('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-php/examples/teams/delete-membership.md new file mode 100644 index 0000000000..2b40c1742e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/delete.md b/docs/examples/1.4.x/server-php/examples/teams/delete.md new file mode 100644 index 0000000000..5ec2ed995c --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->delete('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/get-membership.md b/docs/examples/1.4.x/server-php/examples/teams/get-membership.md new file mode 100644 index 0000000000..fdd3024783 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-php/examples/teams/get-prefs.md new file mode 100644 index 0000000000..0436f96962 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/get-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$teams = new Teams($client); + +$result = $teams->getPrefs('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/get.md b/docs/examples/1.4.x/server-php/examples/teams/get.md new file mode 100644 index 0000000000..94b8a2695a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->get('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-php/examples/teams/list-memberships.md new file mode 100644 index 0000000000..f23b78eca1 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->listMemberships('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/list.md b/docs/examples/1.4.x/server-php/examples/teams/list.md new file mode 100644 index 0000000000..66f54b6e1c --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->list(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-php/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..15504ad421 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$teams = new Teams($client); + +$result = $teams->updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/update-membership.md b/docs/examples/1.4.x/server-php/examples/teams/update-membership.md new file mode 100644 index 0000000000..37b8fa7388 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->updateMembership('[TEAM_ID]', '[MEMBERSHIP_ID]', []); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/update-name.md b/docs/examples/1.4.x/server-php/examples/teams/update-name.md new file mode 100644 index 0000000000..e88a31862d --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/update-name.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->updateName('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-php/examples/teams/update-prefs.md new file mode 100644 index 0000000000..4d044cce23 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$teams = new Teams($client); + +$result = $teams->updatePrefs('[TEAM_ID]', []); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-php/examples/users/create-argon2user.md new file mode 100644 index 0000000000..1036ca109e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createArgon2User('[USER_ID]', 'email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-php/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..de15110a4e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createBcryptUser('[USER_ID]', 'email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-php/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..15f4ebe0aa --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createMD5User('[USER_ID]', 'email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-php/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..2eb682fc42 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createPHPassUser('[USER_ID]', 'email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-php/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..3e63bd9928 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createSHAUser('[USER_ID]', 'email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-php/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..bcf7c52cd5 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createScryptModifiedUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', '[PASSWORD_SALT_SEPARATOR]', '[PASSWORD_SIGNER_KEY]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-php/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..43a4bcc2e2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create-scrypt-user.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->createScryptUser('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', null, null, null, null); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/create.md b/docs/examples/1.4.x/server-php/examples/users/create.md new file mode 100644 index 0000000000..dab8a5ed70 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->create('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/delete-identity.md b/docs/examples/1.4.x/server-php/examples/users/delete-identity.md new file mode 100644 index 0000000000..a25222751c --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/delete-identity.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteIdentity('[IDENTITY_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/delete-session.md b/docs/examples/1.4.x/server-php/examples/users/delete-session.md new file mode 100644 index 0000000000..c6a507c7b2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/delete-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteSession('[USER_ID]', '[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-php/examples/users/delete-sessions.md new file mode 100644 index 0000000000..570d258683 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/delete-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteSessions('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/delete.md b/docs/examples/1.4.x/server-php/examples/users/delete.md new file mode 100644 index 0000000000..1d5a822fde --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->delete('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/get-prefs.md b/docs/examples/1.4.x/server-php/examples/users/get-prefs.md new file mode 100644 index 0000000000..e9c8c58bf3 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/get-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getPrefs('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/get.md b/docs/examples/1.4.x/server-php/examples/users/get.md new file mode 100644 index 0000000000..51482d37eb --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->get('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/list-identities.md b/docs/examples/1.4.x/server-php/examples/users/list-identities.md new file mode 100644 index 0000000000..2d229e4119 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/list-identities.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->listIdentities(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/list-logs.md b/docs/examples/1.4.x/server-php/examples/users/list-logs.md new file mode 100644 index 0000000000..e6287563c2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/list-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->listLogs('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/list-memberships.md b/docs/examples/1.4.x/server-php/examples/users/list-memberships.md new file mode 100644 index 0000000000..039216bc1e --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->listMemberships('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/list-sessions.md b/docs/examples/1.4.x/server-php/examples/users/list-sessions.md new file mode 100644 index 0000000000..e09b65d475 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/list-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->listSessions('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/list.md b/docs/examples/1.4.x/server-php/examples/users/list.md new file mode 100644 index 0000000000..8d86e86372 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->list(); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-php/examples/users/update-email-verification.md new file mode 100644 index 0000000000..67c3e12ee0 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-email-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateEmailVerification('[USER_ID]', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-email.md b/docs/examples/1.4.x/server-php/examples/users/update-email.md new file mode 100644 index 0000000000..c6a7412b89 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-email.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateEmail('[USER_ID]', 'email@example.com'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-labels.md b/docs/examples/1.4.x/server-php/examples/users/update-labels.md new file mode 100644 index 0000000000..b9f4dc30dc --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-labels.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateLabels('[USER_ID]', []); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-name.md b/docs/examples/1.4.x/server-php/examples/users/update-name.md new file mode 100644 index 0000000000..598ef2a3a2 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-name.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateName('[USER_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-password.md b/docs/examples/1.4.x/server-php/examples/users/update-password.md new file mode 100644 index 0000000000..de5ec7d132 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-password.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePassword('[USER_ID]', ''); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-php/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..e9929a547b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-phone-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePhoneVerification('[USER_ID]', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-phone.md b/docs/examples/1.4.x/server-php/examples/users/update-phone.md new file mode 100644 index 0000000000..0df380a23a --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-phone.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePhone('[USER_ID]', '+12065550100'); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-prefs.md b/docs/examples/1.4.x/server-php/examples/users/update-prefs.md new file mode 100644 index 0000000000..9c4ebaae2b --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePrefs('[USER_ID]', []); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-php/examples/users/update-status.md b/docs/examples/1.4.x/server-php/examples/users/update-status.md new file mode 100644 index 0000000000..ad3f6bde79 --- /dev/null +++ b/docs/examples/1.4.x/server-php/examples/users/update-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateStatus('[USER_ID]', false); \ No newline at end of file diff --git a/docs/examples/1.4.x/server-python/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-python/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..2203cdbd0c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/create-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.4.x/server-python/examples/account/create-recovery.md b/docs/examples/1.4.x/server-python/examples/account/create-recovery.md new file mode 100644 index 0000000000..21130fef6d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.create_recovery('email@example.com', 'https://example.com') diff --git a/docs/examples/1.4.x/server-python/examples/account/create-verification.md b/docs/examples/1.4.x/server-python/examples/account/create-verification.md new file mode 100644 index 0000000000..c45d0d462e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/create-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.create_verification('https://example.com') diff --git a/docs/examples/1.4.x/server-python/examples/account/delete-identity.md b/docs/examples/1.4.x/server-python/examples/account/delete-identity.md new file mode 100644 index 0000000000..bac4334585 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.delete_identity('[IDENTITY_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/account/delete-session.md b/docs/examples/1.4.x/server-python/examples/account/delete-session.md new file mode 100644 index 0000000000..8095cdc07f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.delete_session('[SESSION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-python/examples/account/delete-sessions.md new file mode 100644 index 0000000000..1728d61e67 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.4.x/server-python/examples/account/get-prefs.md b/docs/examples/1.4.x/server-python/examples/account/get-prefs.md new file mode 100644 index 0000000000..da2fd7628e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get_prefs() diff --git a/docs/examples/1.4.x/server-python/examples/account/get-session.md b/docs/examples/1.4.x/server-python/examples/account/get-session.md new file mode 100644 index 0000000000..25b8f03837 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/get-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get_session('[SESSION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/account/get.md b/docs/examples/1.4.x/server-python/examples/account/get.md new file mode 100644 index 0000000000..f75bad7769 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get() diff --git a/docs/examples/1.4.x/server-python/examples/account/list-identities.md b/docs/examples/1.4.x/server-python/examples/account/list-identities.md new file mode 100644 index 0000000000..3c166d1df1 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/list-identities.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.list_identities() diff --git a/docs/examples/1.4.x/server-python/examples/account/list-logs.md b/docs/examples/1.4.x/server-python/examples/account/list-logs.md new file mode 100644 index 0000000000..65802d8b0d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.list_logs() diff --git a/docs/examples/1.4.x/server-python/examples/account/list-sessions.md b/docs/examples/1.4.x/server-python/examples/account/list-sessions.md new file mode 100644 index 0000000000..12d5c81d92 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/list-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.list_sessions() diff --git a/docs/examples/1.4.x/server-python/examples/account/update-email.md b/docs/examples/1.4.x/server-python/examples/account/update-email.md new file mode 100644 index 0000000000..f4a6776f72 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_email('email@example.com', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-name.md b/docs/examples/1.4.x/server-python/examples/account/update-name.md new file mode 100644 index 0000000000..eb1eb6279b --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_name('[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-password.md b/docs/examples/1.4.x/server-python/examples/account/update-password.md new file mode 100644 index 0000000000..955ada651d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_password('') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-python/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f2a75b4de9 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_phone_verification('[USER_ID]', '[SECRET]') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-phone.md b/docs/examples/1.4.x/server-python/examples/account/update-phone.md new file mode 100644 index 0000000000..aaee1f7eec --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_phone('+12065550100', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-prefs.md b/docs/examples/1.4.x/server-python/examples/account/update-prefs.md new file mode 100644 index 0000000000..e96546b05a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_prefs({}) diff --git a/docs/examples/1.4.x/server-python/examples/account/update-recovery.md b/docs/examples/1.4.x/server-python/examples/account/update-recovery.md new file mode 100644 index 0000000000..b4ea8aa89c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_recovery('[USER_ID]', '[SECRET]', 'password', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-session.md b/docs/examples/1.4.x/server-python/examples/account/update-session.md new file mode 100644 index 0000000000..e7234f7801 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_session('[SESSION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/account/update-status.md b/docs/examples/1.4.x/server-python/examples/account/update-status.md new file mode 100644 index 0000000000..5924d4d54f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_status() diff --git a/docs/examples/1.4.x/server-python/examples/account/update-verification.md b/docs/examples/1.4.x/server-python/examples/account/update-verification.md new file mode 100644 index 0000000000..9a410a54a8 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/account/update-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_verification('[USER_ID]', '[SECRET]') diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-python/examples/avatars/get-browser.md new file mode 100644 index 0000000000..9ed56d1d4b --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_browser('aa') diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-python/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..9fa6b0fd1f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_credit_card('amex') diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-python/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..75b0315eae --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_favicon('https://example.com') diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-python/examples/avatars/get-flag.md new file mode 100644 index 0000000000..70d2e5f242 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_flag('af') diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-image.md b/docs/examples/1.4.x/server-python/examples/avatars/get-image.md new file mode 100644 index 0000000000..35015d9620 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_image('https://example.com') diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-python/examples/avatars/get-initials.md new file mode 100644 index 0000000000..639fa03bc9 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_initials() diff --git a/docs/examples/1.4.x/server-python/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-python/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..27fc8e2924 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_qr('[TEXT]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..f073d3d3b3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-boolean-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_boolean_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-collection.md b/docs/examples/1.4.x/server-python/examples/databases/create-collection.md new file mode 100644 index 0000000000..183c55c448 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_collection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..5c77689c99 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-datetime-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_datetime_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-document.md b/docs/examples/1.4.x/server-python/examples/databases/create-document.md new file mode 100644 index 0000000000..aa95de9ebd --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_document('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {}) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..92cdcb2a8f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-email-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_email_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..df66f12896 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-enum-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_enum_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..0bfe4248eb --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-float-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_float_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-index.md b/docs/examples/1.4.x/server-python/examples/databases/create-index.md new file mode 100644 index 0000000000..78a7d3327e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-index.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_index('[DATABASE_ID]', '[COLLECTION_ID]', '', 'key', []) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..b3cce2bde4 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-integer-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_integer_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..967d284b9a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-ip-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_ip_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..4f69ecae00 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-relationship-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_relationship_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '[RELATED_COLLECTION_ID]', 'oneToOne') diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..00bbbe9ce7 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-string-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_string_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', 1, False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..fd5b7f44e3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create-url-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create_url_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/create.md b/docs/examples/1.4.x/server-python/examples/databases/create.md new file mode 100644 index 0000000000..e4a832066b --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.create('[DATABASE_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..41871b2662 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.delete_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-python/examples/databases/delete-collection.md new file mode 100644 index 0000000000..998bb61fb9 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.delete_collection('[DATABASE_ID]', '[COLLECTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/delete-document.md b/docs/examples/1.4.x/server-python/examples/databases/delete-document.md new file mode 100644 index 0000000000..605b087b7c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.delete_document('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/delete-index.md b/docs/examples/1.4.x/server-python/examples/databases/delete-index.md new file mode 100644 index 0000000000..a53e06c024 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.delete_index('[DATABASE_ID]', '[COLLECTION_ID]', '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/delete.md b/docs/examples/1.4.x/server-python/examples/databases/delete.md new file mode 100644 index 0000000000..780e1451ef --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.delete('[DATABASE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/get-attribute.md new file mode 100644 index 0000000000..0a6105272a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.get_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/get-collection.md b/docs/examples/1.4.x/server-python/examples/databases/get-collection.md new file mode 100644 index 0000000000..90f57a366c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.get_collection('[DATABASE_ID]', '[COLLECTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/get-document.md b/docs/examples/1.4.x/server-python/examples/databases/get-document.md new file mode 100644 index 0000000000..708538418e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/get-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.get_document('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/get-index.md b/docs/examples/1.4.x/server-python/examples/databases/get-index.md new file mode 100644 index 0000000000..3213c66660 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/get-index.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.get_index('[DATABASE_ID]', '[COLLECTION_ID]', '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/get.md b/docs/examples/1.4.x/server-python/examples/databases/get.md new file mode 100644 index 0000000000..93a46b3fa4 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.get('[DATABASE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-python/examples/databases/list-attributes.md new file mode 100644 index 0000000000..632202c894 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.list_attributes('[DATABASE_ID]', '[COLLECTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/list-collections.md b/docs/examples/1.4.x/server-python/examples/databases/list-collections.md new file mode 100644 index 0000000000..d0c98dad97 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.list_collections('[DATABASE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/list-documents.md b/docs/examples/1.4.x/server-python/examples/databases/list-documents.md new file mode 100644 index 0000000000..5eb03b2658 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.list_documents('[DATABASE_ID]', '[COLLECTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-python/examples/databases/list-indexes.md new file mode 100644 index 0000000000..b4224be62c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.list_indexes('[DATABASE_ID]', '[COLLECTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/list.md b/docs/examples/1.4.x/server-python/examples/databases/list.md new file mode 100644 index 0000000000..3aa6839d20 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.list() diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..e6a7d55fb6 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-boolean-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_boolean_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, False) diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-collection.md b/docs/examples/1.4.x/server-python/examples/databases/update-collection.md new file mode 100644 index 0000000000..4a38aab4d4 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_collection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..5c792573ae --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-datetime-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_datetime_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-document.md b/docs/examples/1.4.x/server-python/examples/databases/update-document.md new file mode 100644 index 0000000000..c768c5403c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_document('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8148b012fd --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-email-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_email_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, 'email@example.com') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..65ef26f274 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-enum-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_enum_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], False, '[DEFAULT]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..efbf1ad04f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-float-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_float_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, None, None, None) diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..61c74b8675 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-integer-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_integer_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, None, None, None) diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..7d5a35d749 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-ip-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_ip_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..7c426a61e3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-relationship-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_relationship_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..2ee236e624 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-string-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_string_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, '[DEFAULT]') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-python/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..119c787d2d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update-url-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update_url_attribute('[DATABASE_ID]', '[COLLECTION_ID]', '', False, 'https://example.com') diff --git a/docs/examples/1.4.x/server-python/examples/databases/update.md b/docs/examples/1.4.x/server-python/examples/databases/update.md new file mode 100644 index 0000000000..d46692ece4 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/databases/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +databases = Databases(client) + +result = databases.update('[DATABASE_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/create-build.md b/docs/examples/1.4.x/server-python/examples/functions/create-build.md new file mode 100644 index 0000000000..76888f8b16 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/create-build.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_build('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-python/examples/functions/create-deployment.md new file mode 100644 index 0000000000..1ee1be05ed --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/create-deployment.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.input_file import InputFile +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_deployment('[FUNCTION_ID]', InputFile.from_path('file.png'), False) diff --git a/docs/examples/1.4.x/server-python/examples/functions/create-execution.md b/docs/examples/1.4.x/server-python/examples/functions/create-execution.md new file mode 100644 index 0000000000..7c045225b3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_execution('[FUNCTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/create-variable.md b/docs/examples/1.4.x/server-python/examples/functions/create-variable.md new file mode 100644 index 0000000000..f33ed08a71 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/create-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_variable('[FUNCTION_ID]', '[KEY]', '[VALUE]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/create.md b/docs/examples/1.4.x/server-python/examples/functions/create.md new file mode 100644 index 0000000000..fa6f46ddc1 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5') diff --git a/docs/examples/1.4.x/server-python/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-python/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..42d526eca9 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-python/examples/functions/delete-variable.md new file mode 100644 index 0000000000..cae0f2df9f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete_variable('[FUNCTION_ID]', '[VARIABLE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/delete.md b/docs/examples/1.4.x/server-python/examples/functions/delete.md new file mode 100644 index 0000000000..e89213ec7a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete('[FUNCTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-python/examples/functions/download-deployment.md new file mode 100644 index 0000000000..ee51f67936 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/download-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.download_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-python/examples/functions/get-deployment.md new file mode 100644 index 0000000000..6257b59d2e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/get-execution.md b/docs/examples/1.4.x/server-python/examples/functions/get-execution.md new file mode 100644 index 0000000000..f0e4f0dc67 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_execution('[FUNCTION_ID]', '[EXECUTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/get-variable.md b/docs/examples/1.4.x/server-python/examples/functions/get-variable.md new file mode 100644 index 0000000000..4e71bff24f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_variable('[FUNCTION_ID]', '[VARIABLE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/get.md b/docs/examples/1.4.x/server-python/examples/functions/get.md new file mode 100644 index 0000000000..30e1d5959a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get('[FUNCTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-python/examples/functions/list-deployments.md new file mode 100644 index 0000000000..d1797a18b3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_deployments('[FUNCTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/list-executions.md b/docs/examples/1.4.x/server-python/examples/functions/list-executions.md new file mode 100644 index 0000000000..d70f004478 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_executions('[FUNCTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-python/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..19b85e2369 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/list-runtimes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.4.x/server-python/examples/functions/list-variables.md b/docs/examples/1.4.x/server-python/examples/functions/list-variables.md new file mode 100644 index 0000000000..9a72bba9f8 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_variables('[FUNCTION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/list.md b/docs/examples/1.4.x/server-python/examples/functions/list.md new file mode 100644 index 0000000000..b8442e5ade --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list() diff --git a/docs/examples/1.4.x/server-python/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-python/examples/functions/update-deployment.md new file mode 100644 index 0000000000..87dd09710f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/update-variable.md b/docs/examples/1.4.x/server-python/examples/functions/update-variable.md new file mode 100644 index 0000000000..ab5b43abce --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/update-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update_variable('[FUNCTION_ID]', '[VARIABLE_ID]', '[KEY]') diff --git a/docs/examples/1.4.x/server-python/examples/functions/update.md b/docs/examples/1.4.x/server-python/examples/functions/update.md new file mode 100644 index 0000000000..1da900890a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/functions/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5') diff --git a/docs/examples/1.4.x/server-python/examples/graphql/mutation.md b/docs/examples/1.4.x/server-python/examples/graphql/mutation.md new file mode 100644 index 0000000000..24226a5a01 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +graphql = Graphql(client) + +result = graphql.mutation({}) diff --git a/docs/examples/1.4.x/server-python/examples/graphql/query.md b/docs/examples/1.4.x/server-python/examples/graphql/query.md new file mode 100644 index 0000000000..8e1597c759 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/graphql/query.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +graphql = Graphql(client) + +result = graphql.query({}) diff --git a/docs/examples/1.4.x/server-python/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-python/examples/health/get-antivirus.md new file mode 100644 index 0000000000..fbfaf0e52e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-antivirus.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-cache.md b/docs/examples/1.4.x/server-python/examples/health/get-cache.md new file mode 100644 index 0000000000..40bc01000b --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-cache.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_cache() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-d-b.md b/docs/examples/1.4.x/server-python/examples/health/get-d-b.md new file mode 100644 index 0000000000..803dd73bd3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-d-b.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_db() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-python/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..43ada69a0f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-pub-sub.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-python/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..4fb0266d11 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_certificates() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-python/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..92e4e2021d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_functions() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-python/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..b798ad7332 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_logs() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-python/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..8406de1ff8 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_webhooks() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-queue.md b/docs/examples/1.4.x/server-python/examples/health/get-queue.md new file mode 100644 index 0000000000..5a35588163 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-queue.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-python/examples/health/get-storage-local.md new file mode 100644 index 0000000000..bb2533e27f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-storage-local.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.4.x/server-python/examples/health/get-time.md b/docs/examples/1.4.x/server-python/examples/health/get-time.md new file mode 100644 index 0000000000..9fe313dd5f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get-time.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_time() diff --git a/docs/examples/1.4.x/server-python/examples/health/get.md b/docs/examples/1.4.x/server-python/examples/health/get.md new file mode 100644 index 0000000000..d3ff594387 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/health/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get() diff --git a/docs/examples/1.4.x/server-python/examples/locale/get.md b/docs/examples/1.4.x/server-python/examples/locale/get.md new file mode 100644 index 0000000000..06b04f2f63 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-codes.md b/docs/examples/1.4.x/server-python/examples/locale/list-codes.md new file mode 100644 index 0000000000..3dc6cf8327 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-codes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_codes() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-continents.md b/docs/examples/1.4.x/server-python/examples/locale/list-continents.md new file mode 100644 index 0000000000..ba9c94f8a9 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-continents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_continents() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-python/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..ea4c43cab6 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-countries-e-u.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-python/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..5a4cafe520 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-countries-phones.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-countries.md b/docs/examples/1.4.x/server-python/examples/locale/list-countries.md new file mode 100644 index 0000000000..f8ec83c83e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-countries.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_countries() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-python/examples/locale/list-currencies.md new file mode 100644 index 0000000000..347e81c54c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-currencies.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.4.x/server-python/examples/locale/list-languages.md b/docs/examples/1.4.x/server-python/examples/locale/list-languages.md new file mode 100644 index 0000000000..ce50a6efe7 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/locale/list-languages.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.list_languages() diff --git a/docs/examples/1.4.x/server-python/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-python/examples/storage/create-bucket.md new file mode 100644 index 0000000000..72ffdccbd8 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.create_bucket('[BUCKET_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/create-file.md b/docs/examples/1.4.x/server-python/examples/storage/create-file.md new file mode 100644 index 0000000000..b469b5bdd5 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/create-file.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.input_file import InputFile +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.create_file('[BUCKET_ID]', '[FILE_ID]', InputFile.from_path('file.png')) diff --git a/docs/examples/1.4.x/server-python/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-python/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..60dc1074fd --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.delete_bucket('[BUCKET_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/delete-file.md b/docs/examples/1.4.x/server-python/examples/storage/delete-file.md new file mode 100644 index 0000000000..9bed0af784 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.delete_file('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-python/examples/storage/get-bucket.md new file mode 100644 index 0000000000..7ea64f22aa --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_bucket('[BUCKET_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-python/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e9f5cce824 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_download('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-python/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..4e12291f13 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_preview('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-python/examples/storage/get-file-view.md new file mode 100644 index 0000000000..01cbfafd26 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_view('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/get-file.md b/docs/examples/1.4.x/server-python/examples/storage/get-file.md new file mode 100644 index 0000000000..f83ed8aa61 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/get-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-python/examples/storage/list-buckets.md new file mode 100644 index 0000000000..204fd9598c --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.list_buckets() diff --git a/docs/examples/1.4.x/server-python/examples/storage/list-files.md b/docs/examples/1.4.x/server-python/examples/storage/list-files.md new file mode 100644 index 0000000000..63101e215e --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/list-files.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.list_files('[BUCKET_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-python/examples/storage/update-bucket.md new file mode 100644 index 0000000000..fb1b76b222 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.update_bucket('[BUCKET_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/storage/update-file.md b/docs/examples/1.4.x/server-python/examples/storage/update-file.md new file mode 100644 index 0000000000..24a92e36c6 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/storage/update-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.update_file('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/create-membership.md b/docs/examples/1.4.x/server-python/examples/teams/create-membership.md new file mode 100644 index 0000000000..57682383f7 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.create_membership('[TEAM_ID]', [], 'https://example.com') diff --git a/docs/examples/1.4.x/server-python/examples/teams/create.md b/docs/examples/1.4.x/server-python/examples/teams/create.md new file mode 100644 index 0000000000..c69012359f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.create('[TEAM_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-python/examples/teams/delete-membership.md new file mode 100644 index 0000000000..f8d875986f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.delete_membership('[TEAM_ID]', '[MEMBERSHIP_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/delete.md b/docs/examples/1.4.x/server-python/examples/teams/delete.md new file mode 100644 index 0000000000..4fc0fa44cc --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.delete('[TEAM_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/get-membership.md b/docs/examples/1.4.x/server-python/examples/teams/get-membership.md new file mode 100644 index 0000000000..e9c62ae3e3 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get_membership('[TEAM_ID]', '[MEMBERSHIP_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-python/examples/teams/get-prefs.md new file mode 100644 index 0000000000..40909fa7d8 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +teams = Teams(client) + +result = teams.get_prefs('[TEAM_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/get.md b/docs/examples/1.4.x/server-python/examples/teams/get.md new file mode 100644 index 0000000000..fdca2fc28f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get('[TEAM_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-python/examples/teams/list-memberships.md new file mode 100644 index 0000000000..63e662a7a6 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.list_memberships('[TEAM_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/list.md b/docs/examples/1.4.x/server-python/examples/teams/list.md new file mode 100644 index 0000000000..e60cb60dab --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.list() diff --git a/docs/examples/1.4.x/server-python/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-python/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..a6cd4cd45f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +teams = Teams(client) + +result = teams.update_membership_status('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/update-membership.md b/docs/examples/1.4.x/server-python/examples/teams/update-membership.md new file mode 100644 index 0000000000..816c6ad894 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.update_membership('[TEAM_ID]', '[MEMBERSHIP_ID]', []) diff --git a/docs/examples/1.4.x/server-python/examples/teams/update-name.md b/docs/examples/1.4.x/server-python/examples/teams/update-name.md new file mode 100644 index 0000000000..929f4ecb48 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.update_name('[TEAM_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-python/examples/teams/update-prefs.md new file mode 100644 index 0000000000..4176c622a0 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +teams = Teams(client) + +result = teams.update_prefs('[TEAM_ID]', {}) diff --git a/docs/examples/1.4.x/server-python/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-python/examples/users/create-argon2user.md new file mode 100644 index 0000000000..be1e8cef36 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-argon2user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_argon2_user('[USER_ID]', 'email@example.com', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-python/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..77c9918879 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-bcrypt-user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_bcrypt_user('[USER_ID]', 'email@example.com', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-python/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..f3ab3f8418 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-m-d5user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_md5_user('[USER_ID]', 'email@example.com', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-python/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..e715f47c14 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-p-h-pass-user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_ph_pass_user('[USER_ID]', 'email@example.com', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-python/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..2a2db5a673 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-s-h-a-user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_sha_user('[USER_ID]', 'email@example.com', 'password') diff --git a/docs/examples/1.4.x/server-python/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-python/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..0b42e98dc7 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_scrypt_modified_user('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', '[PASSWORD_SALT_SEPARATOR]', '[PASSWORD_SIGNER_KEY]') diff --git a/docs/examples/1.4.x/server-python/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-python/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..b445623018 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create-scrypt-user.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create_scrypt_user('[USER_ID]', 'email@example.com', 'password', '[PASSWORD_SALT]', None, None, None, None) diff --git a/docs/examples/1.4.x/server-python/examples/users/create.md b/docs/examples/1.4.x/server-python/examples/users/create.md new file mode 100644 index 0000000000..05249c08ea --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/delete-identity.md b/docs/examples/1.4.x/server-python/examples/users/delete-identity.md new file mode 100644 index 0000000000..d1038248ab --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_identity('[IDENTITY_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/delete-session.md b/docs/examples/1.4.x/server-python/examples/users/delete-session.md new file mode 100644 index 0000000000..26b041db1d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_session('[USER_ID]', '[SESSION_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-python/examples/users/delete-sessions.md new file mode 100644 index 0000000000..dabe4f627d --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_sessions('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/delete.md b/docs/examples/1.4.x/server-python/examples/users/delete.md new file mode 100644 index 0000000000..7fdc77576b --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/get-prefs.md b/docs/examples/1.4.x/server-python/examples/users/get-prefs.md new file mode 100644 index 0000000000..2bbaa88c59 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_prefs('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/get.md b/docs/examples/1.4.x/server-python/examples/users/get.md new file mode 100644 index 0000000000..463957d394 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/list-identities.md b/docs/examples/1.4.x/server-python/examples/users/list-identities.md new file mode 100644 index 0000000000..0addd3ec8a --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/list-identities.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list_identities() diff --git a/docs/examples/1.4.x/server-python/examples/users/list-logs.md b/docs/examples/1.4.x/server-python/examples/users/list-logs.md new file mode 100644 index 0000000000..ca3a5eb815 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list_logs('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/list-memberships.md b/docs/examples/1.4.x/server-python/examples/users/list-memberships.md new file mode 100644 index 0000000000..0dfb97afce --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list_memberships('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/list-sessions.md b/docs/examples/1.4.x/server-python/examples/users/list-sessions.md new file mode 100644 index 0000000000..5f8fbd68ea --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list_sessions('[USER_ID]') diff --git a/docs/examples/1.4.x/server-python/examples/users/list.md b/docs/examples/1.4.x/server-python/examples/users/list.md new file mode 100644 index 0000000000..baaf42c574 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list() diff --git a/docs/examples/1.4.x/server-python/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-python/examples/users/update-email-verification.md new file mode 100644 index 0000000000..8be33ad97f --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_email_verification('[USER_ID]', False) diff --git a/docs/examples/1.4.x/server-python/examples/users/update-email.md b/docs/examples/1.4.x/server-python/examples/users/update-email.md new file mode 100644 index 0000000000..4899bd3936 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_email('[USER_ID]', 'email@example.com') diff --git a/docs/examples/1.4.x/server-python/examples/users/update-labels.md b/docs/examples/1.4.x/server-python/examples/users/update-labels.md new file mode 100644 index 0000000000..b2d4c2dd01 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-labels.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_labels('[USER_ID]', []) diff --git a/docs/examples/1.4.x/server-python/examples/users/update-name.md b/docs/examples/1.4.x/server-python/examples/users/update-name.md new file mode 100644 index 0000000000..66bb6b2920 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_name('[USER_ID]', '[NAME]') diff --git a/docs/examples/1.4.x/server-python/examples/users/update-password.md b/docs/examples/1.4.x/server-python/examples/users/update-password.md new file mode 100644 index 0000000000..e79f1255b8 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_password('[USER_ID]', '') diff --git a/docs/examples/1.4.x/server-python/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-python/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..e42317ca30 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_phone_verification('[USER_ID]', False) diff --git a/docs/examples/1.4.x/server-python/examples/users/update-phone.md b/docs/examples/1.4.x/server-python/examples/users/update-phone.md new file mode 100644 index 0000000000..6df39fc994 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_phone('[USER_ID]', '+12065550100') diff --git a/docs/examples/1.4.x/server-python/examples/users/update-prefs.md b/docs/examples/1.4.x/server-python/examples/users/update-prefs.md new file mode 100644 index 0000000000..53d1e524e2 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_prefs('[USER_ID]', {}) diff --git a/docs/examples/1.4.x/server-python/examples/users/update-status.md b/docs/examples/1.4.x/server-python/examples/users/update-status.md new file mode 100644 index 0000000000..6d1577d401 --- /dev/null +++ b/docs/examples/1.4.x/server-python/examples/users/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_status('[USER_ID]', False) diff --git a/docs/examples/1.4.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..43512be67f --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/create-phone-verification.md @@ -0,0 +1,7 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.4.x/server-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..2ef165d2d4 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/create-recovery.md @@ -0,0 +1,11 @@ +POST /v1/account/recovery HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/create-verification.md b/docs/examples/1.4.x/server-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..81e74312d9 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/create-verification.md @@ -0,0 +1,10 @@ +POST /v1/account/verification HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.4.x/server-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..25db38436b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/delete-session.md b/docs/examples/1.4.x/server-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..4783c1983c --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/delete-session.md @@ -0,0 +1,7 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..8632a92a29 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/delete-sessions.md @@ -0,0 +1,7 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.4.x/server-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..1de7705065 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/get-prefs.md @@ -0,0 +1,7 @@ +GET /v1/account/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/get-session.md b/docs/examples/1.4.x/server-rest/examples/account/get-session.md new file mode 100644 index 0000000000..2953bc7d5b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/get-session.md @@ -0,0 +1,7 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/get.md b/docs/examples/1.4.x/server-rest/examples/account/get.md new file mode 100644 index 0000000000..2cf6ee6937 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/get.md @@ -0,0 +1,7 @@ +GET /v1/account HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/list-identities.md b/docs/examples/1.4.x/server-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..f1fc54d32d --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/list-identities.md @@ -0,0 +1,7 @@ +GET /v1/account/identities HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/list-logs.md b/docs/examples/1.4.x/server-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..811310b9a6 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/list-logs.md @@ -0,0 +1,7 @@ +GET /v1/account/logs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.4.x/server-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..25d7a6247b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/list-sessions.md @@ -0,0 +1,7 @@ +GET /v1/account/sessions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-email.md b/docs/examples/1.4.x/server-rest/examples/account/update-email.md new file mode 100644 index 0000000000..a9bec63172 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-email.md @@ -0,0 +1,11 @@ +PATCH /v1/account/email HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-name.md b/docs/examples/1.4.x/server-rest/examples/account/update-name.md new file mode 100644 index 0000000000..374f2c8642 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-name.md @@ -0,0 +1,10 @@ +PATCH /v1/account/name HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-password.md b/docs/examples/1.4.x/server-rest/examples/account/update-password.md new file mode 100644 index 0000000000..a15a7d3cde --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-password.md @@ -0,0 +1,11 @@ +PATCH /v1/account/password HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a87f9cc404 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-phone-verification.md @@ -0,0 +1,11 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-phone.md b/docs/examples/1.4.x/server-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..90faa9b9f5 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-phone.md @@ -0,0 +1,11 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.4.x/server-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..83f544e705 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-prefs.md @@ -0,0 +1,10 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "prefs": {} +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.4.x/server-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..24cb547aa3 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]", + "password": "password", + "passwordAgain": "password" +} diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-session.md b/docs/examples/1.4.x/server-rest/examples/account/update-session.md new file mode 100644 index 0000000000..880e5ba7e4 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-session.md @@ -0,0 +1,7 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-status.md b/docs/examples/1.4.x/server-rest/examples/account/update-status.md new file mode 100644 index 0000000000..5677d65736 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-status.md @@ -0,0 +1,7 @@ +PATCH /v1/account/status HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/account/update-verification.md b/docs/examples/1.4.x/server-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..ed689bf02e --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/account/update-verification.md @@ -0,0 +1,11 @@ +PUT /v1/account/verification HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..37b093ffeb --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-browser.md @@ -0,0 +1,8 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..da3dea1154 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,8 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6c4005223a --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-favicon.md @@ -0,0 +1,8 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6dc45c4a5b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-flag.md @@ -0,0 +1,8 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..8f7c874750 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-image.md @@ -0,0 +1,8 @@ +GET /v1/avatars/image HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..80e8ad1753 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-initials.md @@ -0,0 +1,8 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..7a6da45f10 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/avatars/get-q-r.md @@ -0,0 +1,8 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..5c45fdb7c6 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-boolean-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.4.x/server-rest/examples/databases/create-collection.md new file mode 100644 index 0000000000..da4b5c1a39 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-collection.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "collectionId": "[COLLECTION_ID]", + "name": "[NAME]", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..0e6f68a1cc --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-datetime-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-document.md b/docs/examples/1.4.x/server-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..6e660cf675 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-document.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "documentId": "[DOCUMENT_ID]", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..10c58b3243 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-email-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..b35d71900d --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-enum-attribute.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "elements": [], + "required": false, + "default": "[DEFAULT]", + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..0df52a4151 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-float-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-index.md b/docs/examples/1.4.x/server-rest/examples/databases/create-index.md new file mode 100644 index 0000000000..1b838dee36 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-index.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "type": "key", + "attributes": [], + "orders": [] +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..7f3112b6ba --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-integer-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..533e905a34 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-ip-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..988b038e45 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-relationship-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "relatedCollectionId": "[RELATED_COLLECTION_ID]", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..33f8a43044 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-string-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "size": 1, + "required": false, + "default": "[DEFAULT]", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..d623119126 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create-url-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/create.md b/docs/examples/1.4.x/server-rest/examples/databases/create.md new file mode 100644 index 0000000000..e38bfe22a3 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/create.md @@ -0,0 +1,12 @@ +POST /v1/databases HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "databaseId": "[DATABASE_ID]", + "name": "[NAME]", + "enabled": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..d0e8fc06cb --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/delete-attribute.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-rest/examples/databases/delete-collection.md new file mode 100644 index 0000000000..c91cdd3d6e --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/delete-collection.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.4.x/server-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..7e3ff8ec43 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/delete-document.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.4.x/server-rest/examples/databases/delete-index.md new file mode 100644 index 0000000000..38b2043384 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/delete.md b/docs/examples/1.4.x/server-rest/examples/databases/delete.md new file mode 100644 index 0000000000..4dbcf04fa3 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/get-attribute.md new file mode 100644 index 0000000000..1477108226 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/get-attribute.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.4.x/server-rest/examples/databases/get-collection.md new file mode 100644 index 0000000000..9735990ca9 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/get-collection.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/get-document.md b/docs/examples/1.4.x/server-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..dc31756d75 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/get-document.md @@ -0,0 +1,8 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/get-index.md b/docs/examples/1.4.x/server-rest/examples/databases/get-index.md new file mode 100644 index 0000000000..4f4c4af634 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/get-index.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/get.md b/docs/examples/1.4.x/server-rest/examples/databases/get.md new file mode 100644 index 0000000000..3006b5008d --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/get.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-rest/examples/databases/list-attributes.md new file mode 100644 index 0000000000..d0dc305bb5 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/list-attributes.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.4.x/server-rest/examples/databases/list-collections.md new file mode 100644 index 0000000000..a250616ea7 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/list-collections.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.4.x/server-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..f3a0b46638 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/list-documents.md @@ -0,0 +1,8 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-rest/examples/databases/list-indexes.md new file mode 100644 index 0000000000..253da29e32 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/list-indexes.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/list.md b/docs/examples/1.4.x/server-rest/examples/databases/list.md new file mode 100644 index 0000000000..559f6ffcba --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/list.md @@ -0,0 +1,7 @@ +GET /v1/databases HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..864c9c0cf2 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-boolean-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "default": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.4.x/server-rest/examples/databases/update-collection.md new file mode 100644 index 0000000000..05e7288326 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-collection.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "name": "[NAME]", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..bfb1d2411b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-datetime-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "default": +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-document.md b/docs/examples/1.4.x/server-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..573e4fdd33 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-document.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..3c5acefed5 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-email-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "default": "email@example.com" +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..78d356c2aa --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-enum-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "elements": [], + "required": false, + "default": "[DEFAULT]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..536480e339 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-float-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0 +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..724efd6376 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-integer-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0 +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..ec98503cd6 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-ip-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "default": +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..de084671cf --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-relationship-attribute.md @@ -0,0 +1,10 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "onDelete": "cascade" +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..b282ae3e12 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-string-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "default": "[DEFAULT]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-rest/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..687dc78c75 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update-url-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "required": false, + "default": "https://example.com" +} diff --git a/docs/examples/1.4.x/server-rest/examples/databases/update.md b/docs/examples/1.4.x/server-rest/examples/databases/update.md new file mode 100644 index 0000000000..0b485fece6 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/databases/update.md @@ -0,0 +1,11 @@ +PUT /v1/databases/{databaseId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "name": "[NAME]", + "enabled": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/functions/create-build.md b/docs/examples/1.4.x/server-rest/examples/functions/create-build.md new file mode 100644 index 0000000000..356ec4ef7d --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/create-build.md @@ -0,0 +1,7 @@ +POST /v1/functions/{functionId}/deployments/{deploymentId}/builds/{buildId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-rest/examples/functions/create-deployment.md new file mode 100644 index 0000000000..7be546e98e --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: HOSTNAME +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="entrypoint" + +"[ENTRYPOINT]" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="commands" + +"[COMMANDS]" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.4.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.4.x/server-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..307386d7cb --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/create-execution.md @@ -0,0 +1,15 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "body": "[BODY]", + "async": false, + "path": "[PATH]", + "method": "GET", + "headers": {} +} diff --git a/docs/examples/1.4.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.4.x/server-rest/examples/functions/create-variable.md new file mode 100644 index 0000000000..0b4d41db14 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/create-variable.md @@ -0,0 +1,11 @@ +POST /v1/functions/{functionId}/variables HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": "[KEY]", + "value": "[VALUE]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/functions/create.md b/docs/examples/1.4.x/server-rest/examples/functions/create.md new file mode 100644 index 0000000000..0f55041b9e --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/create.md @@ -0,0 +1,29 @@ +POST /v1/functions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "functionId": "[FUNCTION_ID]", + "name": "[NAME]", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "[ENTRYPOINT]", + "commands": "[COMMANDS]", + "installationId": "[INSTALLATION_ID]", + "providerRepositoryId": "[PROVIDER_REPOSITORY_ID]", + "providerBranch": "[PROVIDER_BRANCH]", + "providerSilentMode": false, + "providerRootDirectory": "[PROVIDER_ROOT_DIRECTORY]", + "templateRepository": "[TEMPLATE_REPOSITORY]", + "templateOwner": "[TEMPLATE_OWNER]", + "templateRootDirectory": "[TEMPLATE_ROOT_DIRECTORY]", + "templateBranch": "[TEMPLATE_BRANCH]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-rest/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..f9a178b3ab --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-rest/examples/functions/delete-variable.md new file mode 100644 index 0000000000..5bb6d50fd2 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/delete.md b/docs/examples/1.4.x/server-rest/examples/functions/delete.md new file mode 100644 index 0000000000..fcd6c1d25b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-rest/examples/functions/download-deployment.md new file mode 100644 index 0000000000..49e76dd438 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/download-deployment.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-rest/examples/functions/get-deployment.md new file mode 100644 index 0000000000..d5d7194a24 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/get-deployment.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.4.x/server-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..59e2f075a5 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/get-execution.md @@ -0,0 +1,8 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.4.x/server-rest/examples/functions/get-variable.md new file mode 100644 index 0000000000..8a44fd4fff --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/get-variable.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/get.md b/docs/examples/1.4.x/server-rest/examples/functions/get.md new file mode 100644 index 0000000000..6afb6c7651 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/get.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-rest/examples/functions/list-deployments.md new file mode 100644 index 0000000000..aed4499c6f --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/list-deployments.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/deployments HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.4.x/server-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..c6777807fc --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/list-executions.md @@ -0,0 +1,8 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-rest/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..1f0b0d917c --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/list-runtimes.md @@ -0,0 +1,7 @@ +GET /v1/functions/runtimes HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.4.x/server-rest/examples/functions/list-variables.md new file mode 100644 index 0000000000..2757123359 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/list-variables.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/variables HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/list.md b/docs/examples/1.4.x/server-rest/examples/functions/list.md new file mode 100644 index 0000000000..7a5b470c3a --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/list.md @@ -0,0 +1,7 @@ +GET /v1/functions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-rest/examples/functions/update-deployment.md new file mode 100644 index 0000000000..74b3a5c40b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/update-deployment.md @@ -0,0 +1,7 @@ +PATCH /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.4.x/server-rest/examples/functions/update-variable.md new file mode 100644 index 0000000000..8117ac2a77 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/update-variable.md @@ -0,0 +1,11 @@ +PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "key": "[KEY]", + "value": "[VALUE]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/functions/update.md b/docs/examples/1.4.x/server-rest/examples/functions/update.md new file mode 100644 index 0000000000..d2cdca21b9 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/functions/update.md @@ -0,0 +1,24 @@ +PUT /v1/functions/{functionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "name": "[NAME]", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "[ENTRYPOINT]", + "commands": "[COMMANDS]", + "installationId": "[INSTALLATION_ID]", + "providerRepositoryId": "[PROVIDER_REPOSITORY_ID]", + "providerBranch": "[PROVIDER_BRANCH]", + "providerSilentMode": false, + "providerRootDirectory": "[PROVIDER_ROOT_DIRECTORY]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.4.x/server-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..8ba1b8cfd1 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: HOSTNAME +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "query": {} +} diff --git a/docs/examples/1.4.x/server-rest/examples/graphql/query.md b/docs/examples/1.4.x/server-rest/examples/graphql/query.md new file mode 100644 index 0000000000..d5bd655080 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/graphql/query.md @@ -0,0 +1,12 @@ +POST /v1/graphql HTTP/1.1 +Host: HOSTNAME +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "query": {} +} diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-rest/examples/health/get-antivirus.md new file mode 100644 index 0000000000..7278141759 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-antivirus.md @@ -0,0 +1,7 @@ +GET /v1/health/anti-virus HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-cache.md b/docs/examples/1.4.x/server-rest/examples/health/get-cache.md new file mode 100644 index 0000000000..5c300537d8 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-cache.md @@ -0,0 +1,7 @@ +GET /v1/health/cache HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.4.x/server-rest/examples/health/get-d-b.md new file mode 100644 index 0000000000..69956c8f49 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-d-b.md @@ -0,0 +1,7 @@ +GET /v1/health/db HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-rest/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..4987370d77 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-pub-sub.md @@ -0,0 +1,7 @@ +GET /v1/health/pubsub HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-rest/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..d0ca17fe03 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-queue-certificates.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/certificates HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-rest/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..79c240b5d2 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-queue-functions.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/functions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-rest/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..7597164130 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-queue-logs.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/logs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-rest/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3257552c52 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-queue-webhooks.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/webhooks HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-queue.md b/docs/examples/1.4.x/server-rest/examples/health/get-queue.md new file mode 100644 index 0000000000..1b76d7ab4c --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-queue.md @@ -0,0 +1,7 @@ +GET /v1/health/queue HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-rest/examples/health/get-storage-local.md new file mode 100644 index 0000000000..e3b89d9d36 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-storage-local.md @@ -0,0 +1,7 @@ +GET /v1/health/storage/local HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get-time.md b/docs/examples/1.4.x/server-rest/examples/health/get-time.md new file mode 100644 index 0000000000..e51d57d2ca --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get-time.md @@ -0,0 +1,7 @@ +GET /v1/health/time HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/health/get.md b/docs/examples/1.4.x/server-rest/examples/health/get.md new file mode 100644 index 0000000000..d7ccd1707f --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/health/get.md @@ -0,0 +1,7 @@ +GET /v1/health HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/get.md b/docs/examples/1.4.x/server-rest/examples/locale/get.md new file mode 100644 index 0000000000..ef2108360c --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/get.md @@ -0,0 +1,8 @@ +GET /v1/locale HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.4.x/server-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..15cb593682 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-codes.md @@ -0,0 +1,8 @@ +GET /v1/locale/codes HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.4.x/server-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..8397d98d15 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-continents.md @@ -0,0 +1,8 @@ +GET /v1/locale/continents HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..00c7ad223b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,8 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..34cfc0bce0 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,8 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.4.x/server-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..e2821d5350 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-countries.md @@ -0,0 +1,8 @@ +GET /v1/locale/countries HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..df0af85f05 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-currencies.md @@ -0,0 +1,8 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.4.x/server-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..10300b446a --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/locale/list-languages.md @@ -0,0 +1,8 @@ +GET /v1/locale/languages HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-rest/examples/storage/create-bucket.md new file mode 100644 index 0000000000..6bf78a321d --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/create-bucket.md @@ -0,0 +1,19 @@ +POST /v1/storage/buckets HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "bucketId": "[BUCKET_ID]", + "name": "[NAME]", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/storage/create-file.md b/docs/examples/1.4.x/server-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..aea83ddfd7 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: HOSTNAME +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"[FILE_ID]" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.4.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-rest/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..d8bd329c2f --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.4.x/server-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..a200a5e4a1 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-rest/examples/storage/get-bucket.md new file mode 100644 index 0000000000..3c5b94a0d2 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/get-bucket.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..d4900613ae --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/get-file-download.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..1c5e5aeb65 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/get-file-preview.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..fc1da7af32 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/get-file-view.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/get-file.md b/docs/examples/1.4.x/server-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..3002d950e1 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/get-file.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-rest/examples/storage/list-buckets.md new file mode 100644 index 0000000000..e094eccc55 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/list-buckets.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/list-files.md b/docs/examples/1.4.x/server-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..86d50f8802 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/list-files.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-rest/examples/storage/update-bucket.md new file mode 100644 index 0000000000..e6c69069a3 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/update-bucket.md @@ -0,0 +1,18 @@ +PUT /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "name": "[NAME]", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/storage/update-file.md b/docs/examples/1.4.x/server-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..3acf6eb5b2 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/storage/update-file.md @@ -0,0 +1,12 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "name": "[NAME]", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.4.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.4.x/server-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..b52437e464 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "email": "email@example.com", + "userId": "[USER_ID]", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/teams/create.md b/docs/examples/1.4.x/server-rest/examples/teams/create.md new file mode 100644 index 0000000000..2826173726 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/create.md @@ -0,0 +1,13 @@ +POST /v1/teams HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "teamId": "[TEAM_ID]", + "name": "[NAME]", + "roles": [] +} diff --git a/docs/examples/1.4.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..9ac5cff637 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/delete.md b/docs/examples/1.4.x/server-rest/examples/teams/delete.md new file mode 100644 index 0000000000..9995342dfc --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/delete.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.4.x/server-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..7317395a54 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/get-membership.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..bfa1c9c871 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/get.md b/docs/examples/1.4.x/server-rest/examples/teams/get.md new file mode 100644 index 0000000000..57605ffbf5 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/get.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..bacebc9eac --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/list-memberships.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/list.md b/docs/examples/1.4.x/server-rest/examples/teams/list.md new file mode 100644 index 0000000000..216ccebcfa --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/list.md @@ -0,0 +1,8 @@ +GET /v1/teams HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + diff --git a/docs/examples/1.4.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..5b3a0e7414 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/update-membership-status.md @@ -0,0 +1,11 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "userId": "[USER_ID]", + "secret": "[SECRET]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.4.x/server-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..7a584b81a1 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/update-membership.md @@ -0,0 +1,11 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "roles": [] +} diff --git a/docs/examples/1.4.x/server-rest/examples/teams/update-name.md b/docs/examples/1.4.x/server-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..15b2c5db49 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/update-name.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..d04ee5aa7b --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/teams/update-prefs.md @@ -0,0 +1,10 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... + +{ + "prefs": {} +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-rest/examples/users/create-argon2user.md new file mode 100644 index 0000000000..8427c293c4 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-argon2user.md @@ -0,0 +1,13 @@ +POST /v1/users/argon2 HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-rest/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..84b55586d2 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-bcrypt-user.md @@ -0,0 +1,13 @@ +POST /v1/users/bcrypt HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-rest/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..cc9ba30bc4 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-m-d5user.md @@ -0,0 +1,13 @@ +POST /v1/users/md5 HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-rest/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..b3c8465daa --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-p-h-pass-user.md @@ -0,0 +1,13 @@ +POST /v1/users/phpass HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-rest/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..1593d0c565 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-s-h-a-user.md @@ -0,0 +1,14 @@ +POST /v1/users/sha HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "passwordVersion": "sha1", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-rest/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..85c779e99d --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,16 @@ +POST /v1/users/scrypt-modified HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "passwordSalt": "[PASSWORD_SALT]", + "passwordSaltSeparator": "[PASSWORD_SALT_SEPARATOR]", + "passwordSignerKey": "[PASSWORD_SIGNER_KEY]", + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-rest/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..e3c89c1604 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create-scrypt-user.md @@ -0,0 +1,18 @@ +POST /v1/users/scrypt HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "password": "password", + "passwordSalt": "[PASSWORD_SALT]", + "passwordCpu": 0, + "passwordMemory": 0, + "passwordParallel": 0, + "passwordLength": 0, + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/create.md b/docs/examples/1.4.x/server-rest/examples/users/create.md new file mode 100644 index 0000000000..f213113ac9 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/create.md @@ -0,0 +1,14 @@ +POST /v1/users HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "userId": "[USER_ID]", + "email": "email@example.com", + "phone": "+12065550100", + "password": , + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.4.x/server-rest/examples/users/delete-identity.md new file mode 100644 index 0000000000..564d93c729 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +DELETE /v1/users/identities/{identityId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/delete-session.md b/docs/examples/1.4.x/server-rest/examples/users/delete-session.md new file mode 100644 index 0000000000..b44500dd20 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/delete-session.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-rest/examples/users/delete-sessions.md new file mode 100644 index 0000000000..9efbbe2924 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/delete.md b/docs/examples/1.4.x/server-rest/examples/users/delete.md new file mode 100644 index 0000000000..3b6a1854a4 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.4.x/server-rest/examples/users/get-prefs.md new file mode 100644 index 0000000000..ecba746af9 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/get-prefs.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/get.md b/docs/examples/1.4.x/server-rest/examples/users/get.md new file mode 100644 index 0000000000..117d56425f --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/get.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId} HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/list-identities.md b/docs/examples/1.4.x/server-rest/examples/users/list-identities.md new file mode 100644 index 0000000000..369d72b713 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/list-identities.md @@ -0,0 +1,7 @@ +GET /v1/users/identities HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/list-logs.md b/docs/examples/1.4.x/server-rest/examples/users/list-logs.md new file mode 100644 index 0000000000..8feebf59ed --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/list-logs.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/logs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.4.x/server-rest/examples/users/list-memberships.md new file mode 100644 index 0000000000..27aad07c52 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/list-memberships.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/memberships HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.4.x/server-rest/examples/users/list-sessions.md new file mode 100644 index 0000000000..6b19eb10b8 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/list-sessions.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/sessions HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/list.md b/docs/examples/1.4.x/server-rest/examples/users/list.md new file mode 100644 index 0000000000..6b12d12ca1 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/list.md @@ -0,0 +1,7 @@ +GET /v1/users HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-rest/examples/users/update-email-verification.md new file mode 100644 index 0000000000..3b5461757e --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-email-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "emailVerification": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-email.md b/docs/examples/1.4.x/server-rest/examples/users/update-email.md new file mode 100644 index 0000000000..a68c31fc01 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-email.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/email HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "email": "email@example.com" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-labels.md b/docs/examples/1.4.x/server-rest/examples/users/update-labels.md new file mode 100644 index 0000000000..3a19def940 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-labels.md @@ -0,0 +1,10 @@ +PUT /v1/users/{userId}/labels HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "labels": [] +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-name.md b/docs/examples/1.4.x/server-rest/examples/users/update-name.md new file mode 100644 index 0000000000..b138435c31 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-name.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/name HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "name": "[NAME]" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-password.md b/docs/examples/1.4.x/server-rest/examples/users/update-password.md new file mode 100644 index 0000000000..f8b0184ce9 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-password.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/password HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "password": +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-rest/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..0a2173db32 --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-phone-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "phoneVerification": false +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-phone.md b/docs/examples/1.4.x/server-rest/examples/users/update-phone.md new file mode 100644 index 0000000000..1e7b7be8fd --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-phone.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/phone HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "number": "+12065550100" +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.4.x/server-rest/examples/users/update-prefs.md new file mode 100644 index 0000000000..fd1a0c6bfa --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-prefs.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/prefs HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "prefs": {} +} diff --git a/docs/examples/1.4.x/server-rest/examples/users/update-status.md b/docs/examples/1.4.x/server-rest/examples/users/update-status.md new file mode 100644 index 0000000000..6ae20142be --- /dev/null +++ b/docs/examples/1.4.x/server-rest/examples/users/update-status.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/status HTTP/1.1 +Host: HOSTNAME +Content-Type: application/json +X-Appwrite-Response-Format: 1.4.0 +X-Appwrite-Project: 5df5acd0d48c2 +X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2 + +{ + "status": false +} diff --git a/docs/examples/1.4.x/server-ruby/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-ruby/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..7ec0a1c0c9 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/create-phone-verification.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.create_phone_verification() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/create-recovery.md b/docs/examples/1.4.x/server-ruby/examples/account/create-recovery.md new file mode 100644 index 0000000000..5c6d13c724 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.create_recovery(email: 'email@example.com', url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/create-verification.md b/docs/examples/1.4.x/server-ruby/examples/account/create-verification.md new file mode 100644 index 0000000000..dcd9722e47 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/create-verification.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.create_verification(url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/delete-identity.md b/docs/examples/1.4.x/server-ruby/examples/account/delete-identity.md new file mode 100644 index 0000000000..1dcb89a030 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.delete_identity(identity_id: '[IDENTITY_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/delete-session.md b/docs/examples/1.4.x/server-ruby/examples/account/delete-session.md new file mode 100644 index 0000000000..3357b2ba20 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/delete-session.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.delete_session(session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-ruby/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b218a536db --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.delete_sessions() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/get-prefs.md b/docs/examples/1.4.x/server-ruby/examples/account/get-prefs.md new file mode 100644 index 0000000000..24092b922b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.get_prefs() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/get-session.md b/docs/examples/1.4.x/server-ruby/examples/account/get-session.md new file mode 100644 index 0000000000..2a8209031d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/get-session.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.get_session(session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/get.md b/docs/examples/1.4.x/server-ruby/examples/account/get.md new file mode 100644 index 0000000000..61237b2215 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.get() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/list-identities.md b/docs/examples/1.4.x/server-ruby/examples/account/list-identities.md new file mode 100644 index 0000000000..a7173abf11 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/list-identities.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.list_identities() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/list-logs.md b/docs/examples/1.4.x/server-ruby/examples/account/list-logs.md new file mode 100644 index 0000000000..8a08eb96be --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/list-logs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.list_logs() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/list-sessions.md b/docs/examples/1.4.x/server-ruby/examples/account/list-sessions.md new file mode 100644 index 0000000000..a6bcb6816d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/list-sessions.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.list_sessions() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-email.md b/docs/examples/1.4.x/server-ruby/examples/account/update-email.md new file mode 100644 index 0000000000..cd2e10cbbe --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-email.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_email(email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-name.md b/docs/examples/1.4.x/server-ruby/examples/account/update-name.md new file mode 100644 index 0000000000..2685e88cf6 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-name.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_name(name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-password.md b/docs/examples/1.4.x/server-ruby/examples/account/update-password.md new file mode 100644 index 0000000000..6ec26f407a --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-password.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_password(password: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-ruby/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..103b32c00d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_phone_verification(user_id: '[USER_ID]', secret: '[SECRET]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-phone.md b/docs/examples/1.4.x/server-ruby/examples/account/update-phone.md new file mode 100644 index 0000000000..377c578dea --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-phone.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_phone(phone: '+12065550100', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-prefs.md b/docs/examples/1.4.x/server-ruby/examples/account/update-prefs.md new file mode 100644 index 0000000000..338a9704f1 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_prefs(prefs: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-recovery.md b/docs/examples/1.4.x/server-ruby/examples/account/update-recovery.md new file mode 100644 index 0000000000..fa901de857 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_recovery(user_id: '[USER_ID]', secret: '[SECRET]', password: 'password', password_again: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-session.md b/docs/examples/1.4.x/server-ruby/examples/account/update-session.md new file mode 100644 index 0000000000..31dde2e94f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-session.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_session(session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-status.md b/docs/examples/1.4.x/server-ruby/examples/account/update-status.md new file mode 100644 index 0000000000..ea7a3857b5 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-status.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_status() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/account/update-verification.md b/docs/examples/1.4.x/server-ruby/examples/account/update-verification.md new file mode 100644 index 0000000000..b8f674ec77 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/account/update-verification.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Account.new(client) + +response = account.update_verification(user_id: '[USER_ID]', secret: '[SECRET]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-browser.md new file mode 100644 index 0000000000..2a66b46b92 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_browser(code: 'aa') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..d5bcaa824f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_credit_card(code: 'amex') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c995fb2036 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_favicon(url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-flag.md new file mode 100644 index 0000000000..7633756425 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_flag(code: 'af') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-image.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-image.md new file mode 100644 index 0000000000..4ea52a60e4 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_image(url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-initials.md new file mode 100644 index 0000000000..62a8ff855d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_initials() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-ruby/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..03a1f14aa9 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Avatars.new(client) + +response = avatars.get_qr(text: '[TEXT]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..d617d8e322 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-boolean-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_boolean_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-collection.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-collection.md new file mode 100644 index 0000000000..d27e43ad66 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-collection.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_collection(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..127d2ac2d7 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-datetime-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_datetime_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-document.md new file mode 100644 index 0000000000..8177fc4b3b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-document.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_document(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..c7e1aac86b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-email-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_email_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..36f8ee06d4 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-enum-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_enum_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', elements: [], required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..771d281ccf --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-float-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_float_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-index.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-index.md new file mode 100644 index 0000000000..5488e36f74 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-index.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_index(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', type: 'key', attributes: []) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..40649c25f8 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-integer-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_integer_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..ef9e0feba5 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-ip-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_ip_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..573ab10ddc --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-relationship-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_relationship_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', related_collection_id: '[RELATED_COLLECTION_ID]', type: 'oneToOne') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..9901c84b02 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-string-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_string_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', size: 1, required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..475421fe53 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create-url-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create_url_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/create.md b/docs/examples/1.4.x/server-ruby/examples/databases/create.md new file mode 100644 index 0000000000..1ce19d3125 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/create.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.create(database_id: '[DATABASE_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..ae2e32d8bd --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.delete_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-ruby/examples/databases/delete-collection.md new file mode 100644 index 0000000000..f118667b6e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.delete_collection(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/delete-document.md b/docs/examples/1.4.x/server-ruby/examples/databases/delete-document.md new file mode 100644 index 0000000000..0b7baa89ed --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.delete_document(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/delete-index.md b/docs/examples/1.4.x/server-ruby/examples/databases/delete-index.md new file mode 100644 index 0000000000..829e606135 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.delete_index(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/delete.md b/docs/examples/1.4.x/server-ruby/examples/databases/delete.md new file mode 100644 index 0000000000..7e0c4211f1 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/delete.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.delete(database_id: '[DATABASE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/get-attribute.md new file mode 100644 index 0000000000..525c8f14cd --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.get_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/get-collection.md b/docs/examples/1.4.x/server-ruby/examples/databases/get-collection.md new file mode 100644 index 0000000000..897e40d109 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.get_collection(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/get-document.md b/docs/examples/1.4.x/server-ruby/examples/databases/get-document.md new file mode 100644 index 0000000000..d5853aba56 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/get-document.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.get_document(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/get-index.md b/docs/examples/1.4.x/server-ruby/examples/databases/get-index.md new file mode 100644 index 0000000000..3217507541 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/get-index.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.get_index(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/get.md b/docs/examples/1.4.x/server-ruby/examples/databases/get.md new file mode 100644 index 0000000000..ced51d6ad1 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.get(database_id: '[DATABASE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-ruby/examples/databases/list-attributes.md new file mode 100644 index 0000000000..1b57bda217 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.list_attributes(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/list-collections.md b/docs/examples/1.4.x/server-ruby/examples/databases/list-collections.md new file mode 100644 index 0000000000..3d646c47e7 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.list_collections(database_id: '[DATABASE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/list-documents.md b/docs/examples/1.4.x/server-ruby/examples/databases/list-documents.md new file mode 100644 index 0000000000..6f57bb150c --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.list_documents(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-ruby/examples/databases/list-indexes.md new file mode 100644 index 0000000000..d64b3bfc68 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.list_indexes(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/list.md b/docs/examples/1.4.x/server-ruby/examples/databases/list.md new file mode 100644 index 0000000000..84baa108a3 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/list.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..7a7f01a854 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-boolean-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_boolean_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, default: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-collection.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-collection.md new file mode 100644 index 0000000000..eee4058531 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-collection.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_collection(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..c9f9aa759b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-datetime-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_datetime_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, default: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-document.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-document.md new file mode 100644 index 0000000000..dbe1b0d71a --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-document.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_document(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..de2d4c0749 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-email-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_email_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, default: 'email@example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..e248a5bcf7 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-enum-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_enum_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', elements: [], required: false, default: '[DEFAULT]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..555355d6cb --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-float-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_float_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, min: null, max: null, default: null) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..154daf330e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-integer-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_integer_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, min: null, max: null, default: null) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..a6fe4d95bc --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-ip-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_ip_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, default: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..9c51daa3a5 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-relationship-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_relationship_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..e5f2f8f09d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-string-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_string_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, default: '[DEFAULT]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-ruby/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..da21dcbfb0 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update-url-attribute.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update_url_attribute(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', key: '', required: false, default: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/databases/update.md b/docs/examples/1.4.x/server-ruby/examples/databases/update.md new file mode 100644 index 0000000000..0900ab3428 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/databases/update.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +databases = Databases.new(client) + +response = databases.update(database_id: '[DATABASE_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/create-build.md b/docs/examples/1.4.x/server-ruby/examples/functions/create-build.md new file mode 100644 index 0000000000..9c7397bf26 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/create-build.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.create_build(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]', build_id: '[BUILD_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-ruby/examples/functions/create-deployment.md new file mode 100644 index 0000000000..33a74f8ee6 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/create-deployment.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.create_deployment(function_id: '[FUNCTION_ID]', code: InputFile.from_path('dir/file.png'), activate: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.4.x/server-ruby/examples/functions/create-execution.md new file mode 100644 index 0000000000..97f4d74ba1 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.create_execution(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/create-variable.md b/docs/examples/1.4.x/server-ruby/examples/functions/create-variable.md new file mode 100644 index 0000000000..003fb4743a --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/create-variable.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.create_variable(function_id: '[FUNCTION_ID]', key: '[KEY]', value: '[VALUE]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/create.md b/docs/examples/1.4.x/server-ruby/examples/functions/create.md new file mode 100644 index 0000000000..3f9b84d60e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/create.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-14.5') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-ruby/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..64feea1370 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.delete_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-ruby/examples/functions/delete-variable.md new file mode 100644 index 0000000000..598e694141 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.delete_variable(function_id: '[FUNCTION_ID]', variable_id: '[VARIABLE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/delete.md b/docs/examples/1.4.x/server-ruby/examples/functions/delete.md new file mode 100644 index 0000000000..48ea5c7a73 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/delete.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.delete(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-ruby/examples/functions/download-deployment.md new file mode 100644 index 0000000000..7bcb4dda58 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/download-deployment.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.download_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-ruby/examples/functions/get-deployment.md new file mode 100644 index 0000000000..c19163e7f5 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.get_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/get-execution.md b/docs/examples/1.4.x/server-ruby/examples/functions/get-execution.md new file mode 100644 index 0000000000..3deee91574 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.get_execution(function_id: '[FUNCTION_ID]', execution_id: '[EXECUTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/get-variable.md b/docs/examples/1.4.x/server-ruby/examples/functions/get-variable.md new file mode 100644 index 0000000000..835fc30d81 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.get_variable(function_id: '[FUNCTION_ID]', variable_id: '[VARIABLE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/get.md b/docs/examples/1.4.x/server-ruby/examples/functions/get.md new file mode 100644 index 0000000000..cfcf8411e5 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.get(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-ruby/examples/functions/list-deployments.md new file mode 100644 index 0000000000..539301c4bb --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.list_deployments(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/list-executions.md b/docs/examples/1.4.x/server-ruby/examples/functions/list-executions.md new file mode 100644 index 0000000000..c0c1f46cf1 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.list_executions(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-ruby/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..b679da2d8b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/list-runtimes.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.list_runtimes() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/list-variables.md b/docs/examples/1.4.x/server-ruby/examples/functions/list-variables.md new file mode 100644 index 0000000000..4e5bfab891 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.list_variables(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/list.md b/docs/examples/1.4.x/server-ruby/examples/functions/list.md new file mode 100644 index 0000000000..2cc71a5c04 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/list.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-ruby/examples/functions/update-deployment.md new file mode 100644 index 0000000000..c9d9f49d63 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.update_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/update-variable.md b/docs/examples/1.4.x/server-ruby/examples/functions/update-variable.md new file mode 100644 index 0000000000..28d7651a46 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/update-variable.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.update_variable(function_id: '[FUNCTION_ID]', variable_id: '[VARIABLE_ID]', key: '[KEY]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/functions/update.md b/docs/examples/1.4.x/server-ruby/examples/functions/update.md new file mode 100644 index 0000000000..30929d484d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/functions/update.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Functions.new(client) + +response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-14.5') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/graphql/mutation.md b/docs/examples/1.4.x/server-ruby/examples/graphql/mutation.md new file mode 100644 index 0000000000..234dfe6202 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +graphql = Graphql.new(client) + +response = graphql.mutation(query: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/graphql/query.md b/docs/examples/1.4.x/server-ruby/examples/graphql/query.md new file mode 100644 index 0000000000..1304213caf --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/graphql/query.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +graphql = Graphql.new(client) + +response = graphql.query(query: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-ruby/examples/health/get-antivirus.md new file mode 100644 index 0000000000..b1f16bb0b9 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-antivirus.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_antivirus() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-cache.md b/docs/examples/1.4.x/server-ruby/examples/health/get-cache.md new file mode 100644 index 0000000000..4fb77ec68d --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-cache.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_cache() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-d-b.md b/docs/examples/1.4.x/server-ruby/examples/health/get-d-b.md new file mode 100644 index 0000000000..3317acd6fa --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-d-b.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_db() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-ruby/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..98e834be9e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-pub-sub.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_pub_sub() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..a4c5c7016b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_queue_certificates() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..8edb310a5e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_queue_functions() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..74823fcd6c --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_queue_logs() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..53b7f33cfe --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_queue_webhooks() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-queue.md b/docs/examples/1.4.x/server-ruby/examples/health/get-queue.md new file mode 100644 index 0000000000..dfa3c966a4 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-queue.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_queue() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-ruby/examples/health/get-storage-local.md new file mode 100644 index 0000000000..3a85bd3e12 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-storage-local.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_storage_local() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get-time.md b/docs/examples/1.4.x/server-ruby/examples/health/get-time.md new file mode 100644 index 0000000000..9956a33d1f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get-time.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get_time() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/health/get.md b/docs/examples/1.4.x/server-ruby/examples/health/get.md new file mode 100644 index 0000000000..d23a9ad675 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/health/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Health.new(client) + +response = health.get() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/get.md b/docs/examples/1.4.x/server-ruby/examples/locale/get.md new file mode 100644 index 0000000000..e5922f4e7f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.get() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-codes.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-codes.md new file mode 100644 index 0000000000..3463252405 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-codes.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_codes() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-continents.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-continents.md new file mode 100644 index 0000000000..0416baf77a --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-continents.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_continents() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..7faa85143c --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-countries-e-u.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_countries_eu() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..1194f27e0c --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-countries-phones.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_countries_phones() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-countries.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-countries.md new file mode 100644 index 0000000000..b78fba47fd --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-countries.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_countries() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-currencies.md new file mode 100644 index 0000000000..14b2722ae8 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-currencies.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_currencies() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/locale/list-languages.md b/docs/examples/1.4.x/server-ruby/examples/locale/list-languages.md new file mode 100644 index 0000000000..4d88bc4723 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/locale/list-languages.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Locale.new(client) + +response = locale.list_languages() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-ruby/examples/storage/create-bucket.md new file mode 100644 index 0000000000..d6299db79f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.create_bucket(bucket_id: '[BUCKET_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/create-file.md b/docs/examples/1.4.x/server-ruby/examples/storage/create-file.md new file mode 100644 index 0000000000..851ed57a48 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/create-file.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.create_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]', file: InputFile.from_path('dir/file.png')) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-ruby/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3fd51bef5e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.delete_bucket(bucket_id: '[BUCKET_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/delete-file.md b/docs/examples/1.4.x/server-ruby/examples/storage/delete-file.md new file mode 100644 index 0000000000..4d0e3fcbff --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.delete_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-ruby/examples/storage/get-bucket.md new file mode 100644 index 0000000000..ba88debc61 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.get_bucket(bucket_id: '[BUCKET_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-ruby/examples/storage/get-file-download.md new file mode 100644 index 0000000000..a22f4cb68f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.get_file_download(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-ruby/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c5b7c06db1 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.get_file_preview(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-ruby/examples/storage/get-file-view.md new file mode 100644 index 0000000000..c05770b999 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.get_file_view(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/get-file.md b/docs/examples/1.4.x/server-ruby/examples/storage/get-file.md new file mode 100644 index 0000000000..a33835c9e2 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/get-file.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.get_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-ruby/examples/storage/list-buckets.md new file mode 100644 index 0000000000..7009d0a105 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.list_buckets() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/list-files.md b/docs/examples/1.4.x/server-ruby/examples/storage/list-files.md new file mode 100644 index 0000000000..196831a1b3 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/list-files.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.list_files(bucket_id: '[BUCKET_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-ruby/examples/storage/update-bucket.md new file mode 100644 index 0000000000..f990ab3566 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.update_bucket(bucket_id: '[BUCKET_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/storage/update-file.md b/docs/examples/1.4.x/server-ruby/examples/storage/update-file.md new file mode 100644 index 0000000000..8108d3cc28 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/storage/update-file.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Storage.new(client) + +response = storage.update_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/create-membership.md b/docs/examples/1.4.x/server-ruby/examples/teams/create-membership.md new file mode 100644 index 0000000000..30f343c5d8 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.create_membership(team_id: '[TEAM_ID]', roles: [], url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/create.md b/docs/examples/1.4.x/server-ruby/examples/teams/create.md new file mode 100644 index 0000000000..d2dff77f41 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/create.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.create(team_id: '[TEAM_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-ruby/examples/teams/delete-membership.md new file mode 100644 index 0000000000..d41175d4a8 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.delete_membership(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/delete.md b/docs/examples/1.4.x/server-ruby/examples/teams/delete.md new file mode 100644 index 0000000000..c1b9b8d8bb --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/delete.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.delete(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/get-membership.md b/docs/examples/1.4.x/server-ruby/examples/teams/get-membership.md new file mode 100644 index 0000000000..b06101dd84 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.get_membership(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-ruby/examples/teams/get-prefs.md new file mode 100644 index 0000000000..d4317e8dba --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +teams = Teams.new(client) + +response = teams.get_prefs(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/get.md b/docs/examples/1.4.x/server-ruby/examples/teams/get.md new file mode 100644 index 0000000000..7cee601b56 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.get(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-ruby/examples/teams/list-memberships.md new file mode 100644 index 0000000000..885a857d72 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.list_memberships(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/list.md b/docs/examples/1.4.x/server-ruby/examples/teams/list.md new file mode 100644 index 0000000000..e8b581fd91 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/list.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-ruby/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..aaf52cbb9c --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +teams = Teams.new(client) + +response = teams.update_membership_status(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]', user_id: '[USER_ID]', secret: '[SECRET]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/update-membership.md b/docs/examples/1.4.x/server-ruby/examples/teams/update-membership.md new file mode 100644 index 0000000000..4117aa0aed --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.update_membership(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]', roles: []) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/update-name.md b/docs/examples/1.4.x/server-ruby/examples/teams/update-name.md new file mode 100644 index 0000000000..41766d6872 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/update-name.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Teams.new(client) + +response = teams.update_name(team_id: '[TEAM_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-ruby/examples/teams/update-prefs.md new file mode 100644 index 0000000000..7656edcd8b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +teams = Teams.new(client) + +response = teams.update_prefs(team_id: '[TEAM_ID]', prefs: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-argon2user.md new file mode 100644 index 0000000000..9c4fc9ea97 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-argon2user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_argon2_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..700fe49d12 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-bcrypt-user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_bcrypt_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..a7f9c4f7a2 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-m-d5user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_md5_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..d7d8ba1933 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-p-h-pass-user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_ph_pass_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..2d37fc3bfa --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-s-h-a-user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_sha_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..cec9dbb277 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_scrypt_modified_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password', password_salt: '[PASSWORD_SALT]', password_salt_separator: '[PASSWORD_SALT_SEPARATOR]', password_signer_key: '[PASSWORD_SIGNER_KEY]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..94a7af53d2 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create-scrypt-user.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create_scrypt_user(user_id: '[USER_ID]', email: 'email@example.com', password: 'password', password_salt: '[PASSWORD_SALT]', password_cpu: null, password_memory: null, password_parallel: null, password_length: null) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/create.md b/docs/examples/1.4.x/server-ruby/examples/users/create.md new file mode 100644 index 0000000000..b04fd5025f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/create.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.create(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/delete-identity.md b/docs/examples/1.4.x/server-ruby/examples/users/delete-identity.md new file mode 100644 index 0000000000..b1405ddf2a --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.delete_identity(identity_id: '[IDENTITY_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/delete-session.md b/docs/examples/1.4.x/server-ruby/examples/users/delete-session.md new file mode 100644 index 0000000000..3b7918ca1f --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/delete-session.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.delete_session(user_id: '[USER_ID]', session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-ruby/examples/users/delete-sessions.md new file mode 100644 index 0000000000..6772e3fe10 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.delete_sessions(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/delete.md b/docs/examples/1.4.x/server-ruby/examples/users/delete.md new file mode 100644 index 0000000000..62585db404 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/delete.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.delete(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/get-prefs.md b/docs/examples/1.4.x/server-ruby/examples/users/get-prefs.md new file mode 100644 index 0000000000..a4c4764bef --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.get_prefs(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/get.md b/docs/examples/1.4.x/server-ruby/examples/users/get.md new file mode 100644 index 0000000000..a731ada955 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/get.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.get(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/list-identities.md b/docs/examples/1.4.x/server-ruby/examples/users/list-identities.md new file mode 100644 index 0000000000..c087063269 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/list-identities.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.list_identities() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/list-logs.md b/docs/examples/1.4.x/server-ruby/examples/users/list-logs.md new file mode 100644 index 0000000000..fa8586eeff --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/list-logs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.list_logs(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/list-memberships.md b/docs/examples/1.4.x/server-ruby/examples/users/list-memberships.md new file mode 100644 index 0000000000..693e6b9f2c --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.list_memberships(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/list-sessions.md b/docs/examples/1.4.x/server-ruby/examples/users/list-sessions.md new file mode 100644 index 0000000000..765789a0da --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.list_sessions(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/list.md b/docs/examples/1.4.x/server-ruby/examples/users/list.md new file mode 100644 index 0000000000..8d5daf21f8 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/list.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-ruby/examples/users/update-email-verification.md new file mode 100644 index 0000000000..72ec0195dc --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_email_verification(user_id: '[USER_ID]', email_verification: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-email.md b/docs/examples/1.4.x/server-ruby/examples/users/update-email.md new file mode 100644 index 0000000000..a3a7dbde34 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-email.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_email(user_id: '[USER_ID]', email: 'email@example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-labels.md b/docs/examples/1.4.x/server-ruby/examples/users/update-labels.md new file mode 100644 index 0000000000..f94cd1bcaf --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-labels.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_labels(user_id: '[USER_ID]', labels: []) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-name.md b/docs/examples/1.4.x/server-ruby/examples/users/update-name.md new file mode 100644 index 0000000000..fbf00bb51b --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-name.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_name(user_id: '[USER_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-password.md b/docs/examples/1.4.x/server-ruby/examples/users/update-password.md new file mode 100644 index 0000000000..7310a2a0cc --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-password.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_password(user_id: '[USER_ID]', password: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-ruby/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..995a32a4bf --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_phone_verification(user_id: '[USER_ID]', phone_verification: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-phone.md b/docs/examples/1.4.x/server-ruby/examples/users/update-phone.md new file mode 100644 index 0000000000..f1e74b4a9e --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-phone.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_phone(user_id: '[USER_ID]', number: '+12065550100') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-prefs.md b/docs/examples/1.4.x/server-ruby/examples/users/update-prefs.md new file mode 100644 index 0000000000..9845cdf0d5 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_prefs(user_id: '[USER_ID]', prefs: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-ruby/examples/users/update-status.md b/docs/examples/1.4.x/server-ruby/examples/users/update-status.md new file mode 100644 index 0000000000..8a82948c76 --- /dev/null +++ b/docs/examples/1.4.x/server-ruby/examples/users/update-status.md @@ -0,0 +1,14 @@ +require 'Appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Users.new(client) + +response = users.update_status(user_id: '[USER_ID]', status: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/1.4.x/server-swift/examples/account/create-phone-verification.md b/docs/examples/1.4.x/server-swift/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..cdeba91700 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/create-recovery.md b/docs/examples/1.4.x/server-swift/examples/account/create-recovery.md new file mode 100644 index 0000000000..fdb0e53765 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/create-verification.md b/docs/examples/1.4.x/server-swift/examples/account/create-verification.md new file mode 100644 index 0000000000..63a6a7ac94 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/delete-identity.md b/docs/examples/1.4.x/server-swift/examples/account/delete-identity.md new file mode 100644 index 0000000000..1ebcc46a7a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "[IDENTITY_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/delete-session.md b/docs/examples/1.4.x/server-swift/examples/account/delete-session.md new file mode 100644 index 0000000000..de9f736f9c --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/delete-sessions.md b/docs/examples/1.4.x/server-swift/examples/account/delete-sessions.md new file mode 100644 index 0000000000..0f58c600d2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/get-prefs.md b/docs/examples/1.4.x/server-swift/examples/account/get-prefs.md new file mode 100644 index 0000000000..ce72d7c340 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/get-session.md b/docs/examples/1.4.x/server-swift/examples/account/get-session.md new file mode 100644 index 0000000000..e1b48b5aa5 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/get-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/get.md b/docs/examples/1.4.x/server-swift/examples/account/get.md new file mode 100644 index 0000000000..060b6a4a27 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/list-identities.md b/docs/examples/1.4.x/server-swift/examples/account/list-identities.md new file mode 100644 index 0000000000..4158e54b08 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/list-identities.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let identityList = try await account.listIdentities() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/list-logs.md b/docs/examples/1.4.x/server-swift/examples/account/list-logs.md new file mode 100644 index 0000000000..ee2e8bb7e6 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/list-logs.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let logList = try await account.listLogs() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/list-sessions.md b/docs/examples/1.4.x/server-swift/examples/account/list-sessions.md new file mode 100644 index 0000000000..2baf5836a2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-email.md b/docs/examples/1.4.x/server-swift/examples/account/update-email.md new file mode 100644 index 0000000000..4041da0222 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-name.md b/docs/examples/1.4.x/server-swift/examples/account/update-name.md new file mode 100644 index 0000000000..440b1b6c24 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.updateName( + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-password.md b/docs/examples/1.4.x/server-swift/examples/account/update-password.md new file mode 100644 index 0000000000..91d55db20f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-password.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.updatePassword( + password: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-phone-verification.md b/docs/examples/1.4.x/server-swift/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..29052c573a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-phone.md b/docs/examples/1.4.x/server-swift/examples/account/update-phone.md new file mode 100644 index 0000000000..645b6fc840 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-prefs.md b/docs/examples/1.4.x/server-swift/examples/account/update-prefs.md new file mode 100644 index 0000000000..520f9d5fd4 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-recovery.md b/docs/examples/1.4.x/server-swift/examples/account/update-recovery.md new file mode 100644 index 0000000000..92825cae55 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-session.md b/docs/examples/1.4.x/server-swift/examples/account/update-session.md new file mode 100644 index 0000000000..84229182aa --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-status.md b/docs/examples/1.4.x/server-swift/examples/account/update-status.md new file mode 100644 index 0000000000..96b94d63a1 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-status.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.4.x/server-swift/examples/account/update-verification.md b/docs/examples/1.4.x/server-swift/examples/account/update-verification.md new file mode 100644 index 0000000000..b8e925783e --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-browser.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-browser.md new file mode 100644 index 0000000000..df3a99c67a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-browser.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getBrowser( + code: "aa" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..ce4382d77b --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getCreditCard( + code: "amex" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-favicon.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..36c77218b7 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-flag.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-flag.md new file mode 100644 index 0000000000..849ec48cea --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-flag.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getFlag( + code: "af" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-image.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-image.md new file mode 100644 index 0000000000..d457976f54 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-image.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getImage( + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-initials.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-initials.md new file mode 100644 index 0000000000..74d8d956db --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-initials.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getInitials() + diff --git a/docs/examples/1.4.x/server-swift/examples/avatars/get-q-r.md b/docs/examples/1.4.x/server-swift/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..537bfb5b43 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/avatars/get-q-r.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let avatars = Avatars(client) + +let byteBuffer = try await avatars.getQR( + text: "[TEXT]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-boolean-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..11eae088e7 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-boolean-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.createBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-collection.md b/docs/examples/1.4.x/server-swift/examples/databases/create-collection.md new file mode 100644 index 0000000000..ff9172bb29 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-collection.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.createCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-datetime-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..26020fb88f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-datetime-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.createDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-document.md b/docs/examples/1.4.x/server-swift/examples/databases/create-document.md new file mode 100644 index 0000000000..b76eab7c70 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: [:] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-email-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..cddebec6b2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-email-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.createEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-enum-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..dc56bff395 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-enum-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.createEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: [], + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-float-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..ec01499e98 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-float-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.createFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-index.md b/docs/examples/1.4.x/server-swift/examples/databases/create-index.md new file mode 100644 index 0000000000..03cc91b0b4 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-index.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.createIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + type: "key", + attributes: [] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-integer-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..eeea1cb01b --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-integer-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.createIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-ip-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..948aa2ad37 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-ip-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.createIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-relationship-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..adb7cbb1fc --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-relationship-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.createRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + relatedCollectionId: "[RELATED_COLLECTION_ID]", + type: "oneToOne" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-string-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..0d3e65442b --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-string-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.createStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + size: 1, + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create-url-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..747a6c7367 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create-url-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.createUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/create.md b/docs/examples/1.4.x/server-swift/examples/databases/create.md new file mode 100644 index 0000000000..5e4abf88a0 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/create.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.create( + databaseId: "[DATABASE_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/delete-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..0fc9470570 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/delete-collection.md b/docs/examples/1.4.x/server-swift/examples/databases/delete-collection.md new file mode 100644 index 0000000000..b00916534e --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/delete-document.md b/docs/examples/1.4.x/server-swift/examples/databases/delete-document.md new file mode 100644 index 0000000000..185c33d410 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/delete-index.md b/docs/examples/1.4.x/server-swift/examples/databases/delete-index.md new file mode 100644 index 0000000000..0ad4ac3442 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/delete.md b/docs/examples/1.4.x/server-swift/examples/databases/delete.md new file mode 100644 index 0000000000..48b687e237 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.delete( + databaseId: "[DATABASE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/get-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/get-attribute.md new file mode 100644 index 0000000000..e0ea280f56 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.getAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/get-collection.md b/docs/examples/1.4.x/server-swift/examples/databases/get-collection.md new file mode 100644 index 0000000000..39c36b3d61 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.getCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/get-document.md b/docs/examples/1.4.x/server-swift/examples/databases/get-document.md new file mode 100644 index 0000000000..2a12e1140a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/get-index.md b/docs/examples/1.4.x/server-swift/examples/databases/get-index.md new file mode 100644 index 0000000000..e69263346a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.getIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/get.md b/docs/examples/1.4.x/server-swift/examples/databases/get.md new file mode 100644 index 0000000000..805fa3ee23 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.get( + databaseId: "[DATABASE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/list-attributes.md b/docs/examples/1.4.x/server-swift/examples/databases/list-attributes.md new file mode 100644 index 0000000000..475da0a712 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeList = try await databases.listAttributes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/list-collections.md b/docs/examples/1.4.x/server-swift/examples/databases/list-collections.md new file mode 100644 index 0000000000..8e451ca8a0 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/list-collections.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let collectionList = try await databases.listCollections( + databaseId: "[DATABASE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/list-documents.md b/docs/examples/1.4.x/server-swift/examples/databases/list-documents.md new file mode 100644 index 0000000000..24bb859761 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/list-indexes.md b/docs/examples/1.4.x/server-swift/examples/databases/list-indexes.md new file mode 100644 index 0000000000..145c02ddcc --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let indexList = try await databases.listIndexes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/list.md b/docs/examples/1.4.x/server-swift/examples/databases/list.md new file mode 100644 index 0000000000..fe7a54df44 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/list.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let databaseList = try await databases.list() + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-boolean-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..73b68190ba --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.updateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + default: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-collection.md b/docs/examples/1.4.x/server-swift/examples/databases/update-collection.md new file mode 100644 index 0000000000..807c5659f9 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-collection.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.updateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-datetime-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..4ec71bbcf0 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.updateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + default: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-document.md b/docs/examples/1.4.x/server-swift/examples/databases/update-document.md new file mode 100644 index 0000000000..56eed00082 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-email-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..11608e1fca --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.updateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + default: "email@example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-enum-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..fce99d4d03 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.updateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: [], + required: xfalse, + default: "[DEFAULT]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-float-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..6cc8457d00 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.updateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + min: 0, + max: 0, + default: 0 +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-integer-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..cde600aad9 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.updateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + min: 0, + max: 0, + default: 0 +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-ip-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..7d70495c27 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.updateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + default: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-relationship-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..e89c3658c2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-relationship-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.updateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-string-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..40ab7baa48 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-string-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.updateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + default: "[DEFAULT]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update-url-attribute.md b/docs/examples/1.4.x/server-swift/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..ef9198e3bb --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.updateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse, + default: "https://example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/databases/update.md b/docs/examples/1.4.x/server-swift/examples/databases/update.md new file mode 100644 index 0000000000..8e14f08009 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/databases/update.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.update( + databaseId: "[DATABASE_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/create-build.md b/docs/examples/1.4.x/server-swift/examples/functions/create-build.md new file mode 100644 index 0000000000..8419bf6950 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/create-build.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.createBuild( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]", + buildId: "[BUILD_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/create-deployment.md b/docs/examples/1.4.x/server-swift/examples/functions/create-deployment.md new file mode 100644 index 0000000000..c6d32a1ba8 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/create-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDeployment( + functionId: "[FUNCTION_ID]", + code: InputFile.fromPath("file.png"), + activate: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.4.x/server-swift/examples/functions/create-execution.md new file mode 100644 index 0000000000..0354bf5488 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/create-execution.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/create-variable.md b/docs/examples/1.4.x/server-swift/examples/functions/create-variable.md new file mode 100644 index 0000000000..f261311192 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.createVariable( + functionId: "[FUNCTION_ID]", + key: "[KEY]", + value: "[VALUE]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/create.md b/docs/examples/1.4.x/server-swift/examples/functions/create.md new file mode 100644 index 0000000000..5370c789fa --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.create( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/delete-deployment.md b/docs/examples/1.4.x/server-swift/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..228f9f62e2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/delete-variable.md b/docs/examples/1.4.x/server-swift/examples/functions/delete-variable.md new file mode 100644 index 0000000000..410cffe13c --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/delete.md b/docs/examples/1.4.x/server-swift/examples/functions/delete.md new file mode 100644 index 0000000000..bee774e61b --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.delete( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/download-deployment.md b/docs/examples/1.4.x/server-swift/examples/functions/download-deployment.md new file mode 100644 index 0000000000..e75d1e7dfc --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/download-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let byteBuffer = try await functions.downloadDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/get-deployment.md b/docs/examples/1.4.x/server-swift/examples/functions/get-deployment.md new file mode 100644 index 0000000000..0a463c4121 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.getDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/get-execution.md b/docs/examples/1.4.x/server-swift/examples/functions/get-execution.md new file mode 100644 index 0000000000..7af8bd5906 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/get-variable.md b/docs/examples/1.4.x/server-swift/examples/functions/get-variable.md new file mode 100644 index 0000000000..f2fa61b903 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.getVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/get.md b/docs/examples/1.4.x/server-swift/examples/functions/get.md new file mode 100644 index 0000000000..c5ba24ae26 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.get( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/list-deployments.md b/docs/examples/1.4.x/server-swift/examples/functions/list-deployments.md new file mode 100644 index 0000000000..652620bf40 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/list-deployments.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let deploymentList = try await functions.listDeployments( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/list-executions.md b/docs/examples/1.4.x/server-swift/examples/functions/list-executions.md new file mode 100644 index 0000000000..fa32172cbd --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/list-runtimes.md b/docs/examples/1.4.x/server-swift/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..6a543754eb --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let runtimeList = try await functions.listRuntimes() + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/list-variables.md b/docs/examples/1.4.x/server-swift/examples/functions/list-variables.md new file mode 100644 index 0000000000..d13c752254 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let variableList = try await functions.listVariables( + functionId: "[FUNCTION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/list.md b/docs/examples/1.4.x/server-swift/examples/functions/list.md new file mode 100644 index 0000000000..81363f17ff --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/list.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let functionList = try await functions.list() + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/update-deployment.md b/docs/examples/1.4.x/server-swift/examples/functions/update-deployment.md new file mode 100644 index 0000000000..b0f4fc23c4 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.updateDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/update-variable.md b/docs/examples/1.4.x/server-swift/examples/functions/update-variable.md new file mode 100644 index 0000000000..0eb5b2e976 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/update-variable.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.updateVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]", + key: "[KEY]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/functions/update.md b/docs/examples/1.4.x/server-swift/examples/functions/update.md new file mode 100644 index 0000000000..d12bd5c9fb --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/functions/update.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.update( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/graphql/mutation.md b/docs/examples/1.4.x/server-swift/examples/graphql/mutation.md new file mode 100644 index 0000000000..db869d48c9 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/graphql/query.md b/docs/examples/1.4.x/server-swift/examples/graphql/query.md new file mode 100644 index 0000000000..5e97508be5 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/graphql/query.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-antivirus.md b/docs/examples/1.4.x/server-swift/examples/health/get-antivirus.md new file mode 100644 index 0000000000..cab0d98339 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthAntivirus = try await health.getAntivirus() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-cache.md b/docs/examples/1.4.x/server-swift/examples/health/get-cache.md new file mode 100644 index 0000000000..a682d63a6f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getCache() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-d-b.md b/docs/examples/1.4.x/server-swift/examples/health/get-d-b.md new file mode 100644 index 0000000000..81645497b5 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getDB() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-pub-sub.md b/docs/examples/1.4.x/server-swift/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..5bf027108a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getPubSub() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-queue-certificates.md b/docs/examples/1.4.x/server-swift/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..71f4dcfc43 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-queue-certificates.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueCertificates() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-queue-functions.md b/docs/examples/1.4.x/server-swift/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..d6bdf76756 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-queue-functions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueFunctions() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-queue-logs.md b/docs/examples/1.4.x/server-swift/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..7580e46da1 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-queue-logs.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueLogs() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-queue-webhooks.md b/docs/examples/1.4.x/server-swift/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..431a5a031c --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-queue-webhooks.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueWebhooks() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-queue.md b/docs/examples/1.4.x/server-swift/examples/health/get-queue.md new file mode 100644 index 0000000000..6f8131d7e8 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-queue.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getQueue() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-storage-local.md b/docs/examples/1.4.x/server-swift/examples/health/get-storage-local.md new file mode 100644 index 0000000000..ee807980bb --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorageLocal() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get-time.md b/docs/examples/1.4.x/server-swift/examples/health/get-time.md new file mode 100644 index 0000000000..f6d66d950a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get-time.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthTime = try await health.getTime() + diff --git a/docs/examples/1.4.x/server-swift/examples/health/get.md b/docs/examples/1.4.x/server-swift/examples/health/get.md new file mode 100644 index 0000000000..828f3453e0 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/health/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.get() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/get.md b/docs/examples/1.4.x/server-swift/examples/locale/get.md new file mode 100644 index 0000000000..5c5aee4cb4 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-codes.md b/docs/examples/1.4.x/server-swift/examples/locale/list-codes.md new file mode 100644 index 0000000000..72966a6371 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-continents.md b/docs/examples/1.4.x/server-swift/examples/locale/list-continents.md new file mode 100644 index 0000000000..8cd7964b63 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-countries-e-u.md b/docs/examples/1.4.x/server-swift/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..a787e7b722 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-countries-phones.md b/docs/examples/1.4.x/server-swift/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..cf16d2d0b2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-countries.md b/docs/examples/1.4.x/server-swift/examples/locale/list-countries.md new file mode 100644 index 0000000000..32d5901e37 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-currencies.md b/docs/examples/1.4.x/server-swift/examples/locale/list-currencies.md new file mode 100644 index 0000000000..6b1daa7422 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.4.x/server-swift/examples/locale/list-languages.md b/docs/examples/1.4.x/server-swift/examples/locale/list-languages.md new file mode 100644 index 0000000000..72c5649aae --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/create-bucket.md b/docs/examples/1.4.x/server-swift/examples/storage/create-bucket.md new file mode 100644 index 0000000000..d3f91ab7af --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.createBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/create-file.md b/docs/examples/1.4.x/server-swift/examples/storage/create-file.md new file mode 100644 index 0000000000..45dd245d31 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]", + file: InputFile.fromPath("file.png") +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/delete-bucket.md b/docs/examples/1.4.x/server-swift/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..4d41f1c373 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let result = try await storage.deleteBucket( + bucketId: "[BUCKET_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/delete-file.md b/docs/examples/1.4.x/server-swift/examples/storage/delete-file.md new file mode 100644 index 0000000000..b2168f8ca1 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/get-bucket.md b/docs/examples/1.4.x/server-swift/examples/storage/get-bucket.md new file mode 100644 index 0000000000..8a27759e0e --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.getBucket( + bucketId: "[BUCKET_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/get-file-download.md b/docs/examples/1.4.x/server-swift/examples/storage/get-file-download.md new file mode 100644 index 0000000000..5205e17d43 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let byteBuffer = try await storage.getFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/1.4.x/server-swift/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..f6fbec6654 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let byteBuffer = try await storage.getFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/get-file-view.md b/docs/examples/1.4.x/server-swift/examples/storage/get-file-view.md new file mode 100644 index 0000000000..5926bdd959 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let byteBuffer = try await storage.getFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/get-file.md b/docs/examples/1.4.x/server-swift/examples/storage/get-file.md new file mode 100644 index 0000000000..e516242775 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/list-buckets.md b/docs/examples/1.4.x/server-swift/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a3e92b282e --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/list-buckets.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let bucketList = try await storage.listBuckets() + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/list-files.md b/docs/examples/1.4.x/server-swift/examples/storage/list-files.md new file mode 100644 index 0000000000..153a10d27f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/list-files.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "[BUCKET_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/update-bucket.md b/docs/examples/1.4.x/server-swift/examples/storage/update-bucket.md new file mode 100644 index 0000000000..d2fd96c33d --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.updateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/storage/update-file.md b/docs/examples/1.4.x/server-swift/examples/storage/update-file.md new file mode 100644 index 0000000000..f37202aa30 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/storage/update-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/create-membership.md b/docs/examples/1.4.x/server-swift/examples/teams/create-membership.md new file mode 100644 index 0000000000..a43f2a4fbf --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/create-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "[TEAM_ID]", + roles: [], + url: "https://example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/create.md b/docs/examples/1.4.x/server-swift/examples/teams/create.md new file mode 100644 index 0000000000..e4f8c09e57 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/create.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "[TEAM_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/delete-membership.md b/docs/examples/1.4.x/server-swift/examples/teams/delete-membership.md new file mode 100644 index 0000000000..25326deba0 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/delete.md b/docs/examples/1.4.x/server-swift/examples/teams/delete.md new file mode 100644 index 0000000000..c0e3d5e898 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/get-membership.md b/docs/examples/1.4.x/server-swift/examples/teams/get-membership.md new file mode 100644 index 0000000000..c399832ec2 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/get-prefs.md b/docs/examples/1.4.x/server-swift/examples/teams/get-prefs.md new file mode 100644 index 0000000000..4a79855f65 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/get.md b/docs/examples/1.4.x/server-swift/examples/teams/get.md new file mode 100644 index 0000000000..07980d4f48 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/list-memberships.md b/docs/examples/1.4.x/server-swift/examples/teams/list-memberships.md new file mode 100644 index 0000000000..57d6ef7d37 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/list-memberships.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "[TEAM_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/list.md b/docs/examples/1.4.x/server-swift/examples/teams/list.md new file mode 100644 index 0000000000..cdb174c357 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/list.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let teamList = try await teams.list() + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/update-membership-status.md b/docs/examples/1.4.x/server-swift/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..e209ece5ea --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/update-membership.md b/docs/examples/1.4.x/server-swift/examples/teams/update-membership.md new file mode 100644 index 0000000000..0bbb83228e --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: [] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/update-name.md b/docs/examples/1.4.x/server-swift/examples/teams/update-name.md new file mode 100644 index 0000000000..378d6d1ade --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "[TEAM_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/teams/update-prefs.md b/docs/examples/1.4.x/server-swift/examples/teams/update-prefs.md new file mode 100644 index 0000000000..142896ad8a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "[TEAM_ID]", + prefs: [:] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-argon2user.md b/docs/examples/1.4.x/server-swift/examples/users/create-argon2user.md new file mode 100644 index 0000000000..5914c87d96 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createArgon2User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-bcrypt-user.md b/docs/examples/1.4.x/server-swift/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..4321365b5c --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createBcryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-m-d5user.md b/docs/examples/1.4.x/server-swift/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..2302780c6b --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createMD5User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-p-h-pass-user.md b/docs/examples/1.4.x/server-swift/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..b856891a7d --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createPHPassUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-s-h-a-user.md b/docs/examples/1.4.x/server-swift/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..c96661377a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-s-h-a-user.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createSHAUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-scrypt-modified-user.md b/docs/examples/1.4.x/server-swift/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..3a9f70386e --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptModifiedUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordSaltSeparator: "[PASSWORD_SALT_SEPARATOR]", + passwordSignerKey: "[PASSWORD_SIGNER_KEY]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create-scrypt-user.md b/docs/examples/1.4.x/server-swift/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..dbe923de93 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0 +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/create.md b/docs/examples/1.4.x/server-swift/examples/users/create.md new file mode 100644 index 0000000000..db49c1f77f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/create.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.create( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/delete-identity.md b/docs/examples/1.4.x/server-swift/examples/users/delete-identity.md new file mode 100644 index 0000000000..d4b26dbc68 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteIdentity( + identityId: "[IDENTITY_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/delete-session.md b/docs/examples/1.4.x/server-swift/examples/users/delete-session.md new file mode 100644 index 0000000000..161e11d274 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSession( + userId: "[USER_ID]", + sessionId: "[SESSION_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/delete-sessions.md b/docs/examples/1.4.x/server-swift/examples/users/delete-sessions.md new file mode 100644 index 0000000000..71bc2bf893 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSessions( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/delete.md b/docs/examples/1.4.x/server-swift/examples/users/delete.md new file mode 100644 index 0000000000..c8762da65a --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let result = try await users.delete( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/get-prefs.md b/docs/examples/1.4.x/server-swift/examples/users/get-prefs.md new file mode 100644 index 0000000000..956724d0b3 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let preferences = try await users.getPrefs( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/get.md b/docs/examples/1.4.x/server-swift/examples/users/get.md new file mode 100644 index 0000000000..a2b3a126f9 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.get( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/list-identities.md b/docs/examples/1.4.x/server-swift/examples/users/list-identities.md new file mode 100644 index 0000000000..db55096368 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/list-identities.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let identityList = try await users.listIdentities() + diff --git a/docs/examples/1.4.x/server-swift/examples/users/list-logs.md b/docs/examples/1.4.x/server-swift/examples/users/list-logs.md new file mode 100644 index 0000000000..20a55b7f50 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let logList = try await users.listLogs( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/list-memberships.md b/docs/examples/1.4.x/server-swift/examples/users/list-memberships.md new file mode 100644 index 0000000000..c07287eb46 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/list-memberships.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let membershipList = try await users.listMemberships( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/list-sessions.md b/docs/examples/1.4.x/server-swift/examples/users/list-sessions.md new file mode 100644 index 0000000000..9f403d8da0 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let sessionList = try await users.listSessions( + userId: "[USER_ID]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/list.md b/docs/examples/1.4.x/server-swift/examples/users/list.md new file mode 100644 index 0000000000..6b41b20015 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/list.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let userList = try await users.list() + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-email-verification.md b/docs/examples/1.4.x/server-swift/examples/users/update-email-verification.md new file mode 100644 index 0000000000..b0649e63f6 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmailVerification( + userId: "[USER_ID]", + emailVerification: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-email.md b/docs/examples/1.4.x/server-swift/examples/users/update-email.md new file mode 100644 index 0000000000..892ff0033f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmail( + userId: "[USER_ID]", + email: "email@example.com" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-labels.md b/docs/examples/1.4.x/server-swift/examples/users/update-labels.md new file mode 100644 index 0000000000..47fc143387 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updateLabels( + userId: "[USER_ID]", + labels: [] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-name.md b/docs/examples/1.4.x/server-swift/examples/users/update-name.md new file mode 100644 index 0000000000..a5ce6f9cad --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updateName( + userId: "[USER_ID]", + name: "[NAME]" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-password.md b/docs/examples/1.4.x/server-swift/examples/users/update-password.md new file mode 100644 index 0000000000..fa2de8b93c --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePassword( + userId: "[USER_ID]", + password: "" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-phone-verification.md b/docs/examples/1.4.x/server-swift/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..f837ffc167 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhoneVerification( + userId: "[USER_ID]", + phoneVerification: xfalse +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-phone.md b/docs/examples/1.4.x/server-swift/examples/users/update-phone.md new file mode 100644 index 0000000000..f2b8f350de --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhone( + userId: "[USER_ID]", + number: "+12065550100" +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-prefs.md b/docs/examples/1.4.x/server-swift/examples/users/update-prefs.md new file mode 100644 index 0000000000..fc4131ea2f --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let preferences = try await users.updatePrefs( + userId: "[USER_ID]", + prefs: [:] +) + diff --git a/docs/examples/1.4.x/server-swift/examples/users/update-status.md b/docs/examples/1.4.x/server-swift/examples/users/update-status.md new file mode 100644 index 0000000000..f382775b17 --- /dev/null +++ b/docs/examples/1.4.x/server-swift/examples/users/update-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let users = Users(client) + +let user = try await users.updateStatus( + userId: "[USER_ID]", + status: xfalse +) + diff --git a/docs/references/account/delete-identity.md b/docs/references/account/delete-identity.md new file mode 100644 index 0000000000..ef480e06a4 --- /dev/null +++ b/docs/references/account/delete-identity.md @@ -0,0 +1 @@ +Delete an identity by its unique ID. \ No newline at end of file diff --git a/docs/references/account/get-prefs.md b/docs/references/account/get-prefs.md index 8edfbb6883..867684dad7 100644 --- a/docs/references/account/get-prefs.md +++ b/docs/references/account/get-prefs.md @@ -1 +1 @@ -Get currently logged in user preferences as a key-value object. \ No newline at end of file +Get the preferences as a key-value object for the currently logged in user. \ No newline at end of file diff --git a/docs/references/account/get.md b/docs/references/account/get.md index f62b1f52bf..4dcae53117 100644 --- a/docs/references/account/get.md +++ b/docs/references/account/get.md @@ -1 +1 @@ -Get currently logged in user data as JSON object. \ No newline at end of file +Get the currently logged in user. \ No newline at end of file diff --git a/docs/references/account/list-identities.md b/docs/references/account/list-identities.md new file mode 100644 index 0000000000..4378bfb67a --- /dev/null +++ b/docs/references/account/list-identities.md @@ -0,0 +1 @@ +Get the list of identities for the currently logged in user. \ No newline at end of file diff --git a/docs/references/account/list-logs.md b/docs/references/account/list-logs.md index 5cd2a4b87e..1f3a8d67a4 100644 --- a/docs/references/account/list-logs.md +++ b/docs/references/account/list-logs.md @@ -1 +1 @@ -Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/references/account/list-sessions.md b/docs/references/account/list-sessions.md index e944fd3675..f4eadf285c 100644 --- a/docs/references/account/list-sessions.md +++ b/docs/references/account/list-sessions.md @@ -1 +1 @@ -Get currently logged in user list of active sessions across different devices. \ No newline at end of file +Get the list of active sessions across different devices for the currently logged in user. \ 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..31a288a35a --- /dev/null +++ b/docs/references/functions/create-build.md @@ -0,0 +1 @@ +Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build. \ No newline at end of file diff --git a/docs/references/functions/create-deployment.md b/docs/references/functions/create-deployment.md index 7cae5989ae..c9dc6e3a7b 100644 --- a/docs/references/functions/create-deployment.md +++ b/docs/references/functions/create-deployment.md @@ -2,4 +2,4 @@ Create a new function code deployment. Use this endpoint to upload a new version This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](/docs/functions). -Use the "command" param to set the entry point used to execute your code. \ No newline at end of file +Use the "command" param to set the entrypoint used to execute your code. \ No newline at end of file diff --git a/docs/references/functions/create-variable.md b/docs/references/functions/create-variable.md index 35747c42a6..40fabd75a8 100644 --- a/docs/references/functions/create-variable.md +++ b/docs/references/functions/create-variable.md @@ -1 +1 @@ -Create a new function variable. These variables can be accessed within function in the `env` object under the request variable. \ No newline at end of file +Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. \ No newline at end of file diff --git a/docs/references/project/create-variable.md b/docs/references/project/create-variable.md new file mode 100644 index 0000000000..2bbee5bf99 --- /dev/null +++ b/docs/references/project/create-variable.md @@ -0,0 +1 @@ +Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime. \ No newline at end of file diff --git a/docs/references/project/delete-variable.md b/docs/references/project/delete-variable.md new file mode 100644 index 0000000000..9be15f83ca --- /dev/null +++ b/docs/references/project/delete-variable.md @@ -0,0 +1 @@ +Delete a project variable by its unique ID. \ No newline at end of file diff --git a/docs/references/project/get-variable.md b/docs/references/project/get-variable.md new file mode 100644 index 0000000000..8636768434 --- /dev/null +++ b/docs/references/project/get-variable.md @@ -0,0 +1 @@ +Get a project variable by its unique ID. \ No newline at end of file diff --git a/docs/references/project/list-variables.md b/docs/references/project/list-variables.md new file mode 100644 index 0000000000..fbe191178a --- /dev/null +++ b/docs/references/project/list-variables.md @@ -0,0 +1 @@ +Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime. \ No newline at end of file diff --git a/docs/references/project/update-variable.md b/docs/references/project/update-variable.md new file mode 100644 index 0000000000..603622b2c7 --- /dev/null +++ b/docs/references/project/update-variable.md @@ -0,0 +1 @@ +Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime. \ No newline at end of file diff --git a/docs/references/proxy/create-rule.md b/docs/references/proxy/create-rule.md new file mode 100644 index 0000000000..be567b1cc0 --- /dev/null +++ b/docs/references/proxy/create-rule.md @@ -0,0 +1 @@ +Create a new proxy rule. \ No newline at end of file diff --git a/docs/references/proxy/delete-rule.md b/docs/references/proxy/delete-rule.md new file mode 100644 index 0000000000..7a4823f86d --- /dev/null +++ b/docs/references/proxy/delete-rule.md @@ -0,0 +1 @@ +Delete a proxy rule by its unique ID. \ No newline at end of file diff --git a/docs/references/proxy/get-rule.md b/docs/references/proxy/get-rule.md new file mode 100644 index 0000000000..cfd040141e --- /dev/null +++ b/docs/references/proxy/get-rule.md @@ -0,0 +1 @@ +Get a proxy rule by its unique ID. \ No newline at end of file diff --git a/docs/references/proxy/list-rules.md b/docs/references/proxy/list-rules.md new file mode 100644 index 0000000000..042d780f02 --- /dev/null +++ b/docs/references/proxy/list-rules.md @@ -0,0 +1 @@ +Get a list of all the proxy rules. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/teams/update-team-membership-roles.md b/docs/references/teams/update-team-membership.md similarity index 78% rename from docs/references/teams/update-team-membership-roles.md rename to docs/references/teams/update-team-membership.md index 344d2875df..5f7b46e640 100644 --- a/docs/references/teams/update-team-membership-roles.md +++ b/docs/references/teams/update-team-membership.md @@ -1 +1 @@ -Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions). \ No newline at end of file +Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions). diff --git a/docs/references/users/delete-identity.md b/docs/references/users/delete-identity.md new file mode 100644 index 0000000000..ef480e06a4 --- /dev/null +++ b/docs/references/users/delete-identity.md @@ -0,0 +1 @@ +Delete an identity by its unique ID. \ No newline at end of file diff --git a/docs/references/users/list-identities.md b/docs/references/users/list-identities.md new file mode 100644 index 0000000000..e8a66e5e40 --- /dev/null +++ b/docs/references/users/list-identities.md @@ -0,0 +1 @@ +Get identities for all users. \ No newline at end of file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 16197b3969..f0cf7868d2 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,3 +1,18 @@ +## 9.0.0 + +* Support for Appwrite 1.4.0 +* New endpoints for fetching user identities +* New endpoints for listing locale codes +* New endpoint for downloading a function deployment +* Updated documentation +* Breaking changes: + * The `createFunction` method has a new signature. + * The `createExecution` method has a new signature. + * The `updateFunction` method has a new signature. + * The `createDeployment` method no longer requires an entrypoint. + * The `updateFile` method now includes the ability to update the file name. + * The `updateMembershipRoles` method has been renamed to `updateMembership`. + ## 8.0.0 * Added relationships support diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index dbac2c9816..f682d203ce 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,17 @@ +## 10.0.0 + +* Support for Appwrite 1.4.0 +* New endpoints for fetching user identities +* New endpoints for listing locale codes +* Updated documentation +* Breaking changes: + * The `createFunction` method has a new signature. + * The `createExecution` method has a new signature. + * The `updateFunction` method has a new signature. + * The `createDeployment` method no longer requires an entrypoint. + * The `updateFile` method now includes the ability to update the file name. + * The `updateMembershipRoles` method has been renamed to `updateMembership`. + ## 9.0.0 * Added relationships support diff --git a/docs/services/proxy.md b/docs/services/proxy.md new file mode 100644 index 0000000000..ebf189595a --- /dev/null +++ b/docs/services/proxy.md @@ -0,0 +1,3 @@ +The Proxy service allows you to configure behavior for your attached domains. You can use proxy service to create rules that define what is returned on specific domains and subdomains. + +Proxy Rules can be configured to serve Appwrite API, which allows you to comply with first-party cookies, making your website more secure. It can also be configured to serve Appwrite Function, which lets you accept incoming webhooks, build custom API endpoints, and serve static files. \ No newline at end of file diff --git a/docs/services/vcs.md b/docs/services/vcs.md new file mode 100644 index 0000000000..db8cbfdd99 --- /dev/null +++ b/docs/services/vcs.md @@ -0,0 +1,3 @@ +The VCS (Version Control System) service in Appwrite provides a way to interact with VCS providers like Git, GitHub etc. and manage your code repositories. You can use it to install the VCS app or to create, list, and delete repositories. You can also use the VCS service to clone, push, and pull code from your repositories. + +The VCS service helps you to either link an existing code repository to your Appwrite Function or to create a new repository from scratch using one of the available templates. If you link a repository to an Appwrite Function, it automatically creates a new deployment when you push changes. diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index 4aa20649ca..734f199693 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -42,7 +42,7 @@ app/config/providers.php Make sure to fill in all data needed and that your provider array key name: -- is in [`camelCase`](https://en.wikipedia.org/wiki/Camel_case) format +- is in [`camelCase`](https://en.wikipedia.org/wiki/Camel_case) format for sentence, but lowercase for names. `github` must be all lowercased, but `paypalSandbox` should have uppercase S - has no spaces or special characters > Please make sure to keep the list of providers in `providers.php` in the alphabetical order A-Z. diff --git a/phpcs.xml b/phpcs.xml index ccde5812b3..70e4df36ed 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -7,6 +7,8 @@ ./app/sdks + + ./tests/resources/functions ./app/console diff --git a/src/Appwrite/Auth/OAuth2.php b/src/Appwrite/Auth/OAuth2.php index c737e183f8..f7dc1d50a1 100644 --- a/src/Appwrite/Auth/OAuth2.php +++ b/src/Appwrite/Auth/OAuth2.php @@ -208,7 +208,7 @@ abstract class OAuth2 \curl_close($ch); - if ($code != 200) { + if ($code >= 400) { throw new Exception($response, $code); } diff --git a/src/Appwrite/Auth/OAuth2/Exception.php b/src/Appwrite/Auth/OAuth2/Exception.php index af98fa5e9d..28d8d652f9 100644 --- a/src/Appwrite/Auth/OAuth2/Exception.php +++ b/src/Appwrite/Auth/OAuth2/Exception.php @@ -16,9 +16,15 @@ class Exception extends AppwriteException $this->message = $response; $decoded = json_decode($response, true); if (\is_array($decoded)) { - $this->error = $decoded['error']; - $this->errorDescription = $decoded['error_description']; - $this->message = $this->error . ': ' . $this->errorDescription; + if (\is_array($decoded['error'] ?? '')) { + $this->error = $decoded['error']['status']; + $this->errorDescription = $decoded['error']['message']; + $this->message = $this->error . ': ' . $this->errorDescription; + } else { + $this->error = $decoded['error'] ?? $decoded['message'] ?? 'Unknown error'; + $this->errorDescription = $decoded['error_description'] ?? 'No description'; + $this->message = $this->error . ': ' . $this->errorDescription; + } } $type = match ($code) { 400 => AppwriteException::USER_OAUTH2_BAD_REQUEST, diff --git a/src/Appwrite/Auth/OAuth2/Firebase.php b/src/Appwrite/Auth/OAuth2/Firebase.php new file mode 100644 index 0000000000..9c64038089 --- /dev/null +++ b/src/Appwrite/Auth/OAuth2/Firebase.php @@ -0,0 +1,389 @@ + 'offline', + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'scope' => \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + 'response_type' => 'code', + 'prompt' => 'consent', + ]); + } + + /** + * @param string $code + * + * @return array + */ + protected function getTokens(string $code): array + { + if (empty($this->tokens)) { + $response = $this->request( + 'POST', + 'https://oauth2.googleapis.com/token', + [], + \http_build_query([ + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'client_secret' => $this->appSecret, + 'code' => $code, + 'grant_type' => 'authorization_code' + ]) + ); + + $this->tokens = \json_decode($response, true); + } + + return $this->tokens; + } + + /** + * @param string $refreshToken + * + * @return array + */ + public function refreshTokens(string $refreshToken): array + { + $response = $this->request( + 'POST', + 'https://oauth2.googleapis.com/token', + [], + \http_build_query([ + 'client_id' => $this->appID, + 'client_secret' => $this->appSecret, + 'grant_type' => 'refresh_token', + 'refresh_token' => $refreshToken + ]) + ); + + $output = []; + \parse_str($response, $output); + $this->tokens = $output; + + if (empty($this->tokens['refresh_token'])) { + $this->tokens['refresh_token'] = $refreshToken; + } + + return $this->tokens; + } + + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserID(string $accessToken): string + { + $user = $this->getUser($accessToken); + + return $user['id'] ?? ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken): string + { + $user = $this->getUser($accessToken); + + return $user['email'] ?? ''; + } + + + /** + * Check if the OAuth email is verified + * + * @link https://docs.github.com/en/rest/users/emails#list-email-addresses-for-the-authenticated-user + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['verified'] ?? false) { + return true; + } + + return false; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserName(string $accessToken): string + { + $user = $this->getUser($accessToken); + + return $user['name'] ?? ''; + } + + /** + * @param string $accessToken + * + * @return array + */ + protected function getUser(string $accessToken) + { + if (empty($this->user)) { + $response = $this->request( + 'GET', + 'https://www.googleapis.com/oauth2/v1/userinfo?access_token=' . \urlencode($accessToken), + [], + ); + + $this->user = \json_decode($response, true); + } + + return $this->user; + } + + public function getProjects(string $accessToken): array + { + $projects = $this->request('GET', 'https://firebase.googleapis.com/v1beta1/projects', ['Authorization: Bearer ' . \urlencode($accessToken)]); + + $projects = \json_decode($projects, true); + + return $projects['results']; + } + + /* + Be careful with the setIAMPolicy method, it will overwrite all existing policies + **/ + public function assignIAMRole(string $accessToken, string $email, string $projectId, array $role) + { + // Get IAM Roles + $iamRoles = $this->request('POST', 'https://cloudresourcemanager.googleapis.com/v1/projects/' . $projectId . ':getIamPolicy', [ + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Content-Type: application/json' + ]); + + $iamRoles = \json_decode($iamRoles, true); + + $iamRoles['bindings'][] = [ + 'role' => $role['name'], + 'members' => [ + 'serviceAccount:' . $email + ] + ]; + + // Set IAM Roles + $this->request('POST', 'https://cloudresourcemanager.googleapis.com/v1/projects/' . $projectId . ':setIamPolicy', [ + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Content-Type: application/json' + ], \json_encode([ + 'policy' => $iamRoles + ])); + } + + private function generateRandomString($length = 10): string + { + $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[random_int(0, $charactersLength - 1)]; + } + return $randomString; + } + + private function createCustomRole(string $accessToken, string $projectId): array + { + // Check if role already exists + try { + $role = $this->request('GET', 'https://iam.googleapis.com/v1/projects/' . $projectId . '/roles/appwriteMigrations', [ + 'Content-Type: application/json', + 'Authorization: Bearer ' . \urlencode($accessToken), + ]); + + $role = \json_decode($role, true); + + return $role; + } catch (\Exception $e) { + if ($e->getCode() !== 404) { + throw $e; + } + } + + // Create role if doesn't exist or isn't correct + $role = $this->request( + 'POST', + 'https://iam.googleapis.com/v1/projects/' . $projectId . '/roles/', + [ + 'Content-Type: application/json', + 'Authorization: Bearer ' . \urlencode($accessToken), + ], + \json_encode( + [ + 'roleId' => 'appwriteMigrations', + 'role' => [ + 'title' => 'Appwrite Migrations', + 'description' => 'A helper role for Appwrite Migrations', + 'includedPermissions' => $this->iamPermissions, + 'stage' => 'GA' + ] + ] + ) + ); + + return json_decode($role, true); + } + + public function createServiceAccount(string $accessToken, string $projectId): array + { + // Create Service Account + $uid = $this->generateRandomString(); + + $response = $this->request( + 'POST', + 'https://iam.googleapis.com/v1/projects/' . $projectId . '/serviceAccounts', + [ + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Content-Type: application/json' + ], + \json_encode([ + 'accountId' => 'appwrite-' . $uid, + 'serviceAccount' => [ + 'displayName' => 'Appwrite Migrations ' . $uid + ] + ]) + ); + + $response = json_decode($response, true); + + // Create and assign IAM Roles + $role = $this->createCustomRole($accessToken, $projectId); + + \sleep(1); // Wait for IAM to propagate changes. + + $this->assignIAMRole($accessToken, $response['email'], $projectId, $role); + + // Create Service Account Key + $responseKey = $this->request( + 'POST', + 'https://iam.googleapis.com/v1/projects/' . $projectId . '/serviceAccounts/' . $response['email'] . '/keys', + [ + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Content-Type: application/json' + ] + ); + + $responseKey = json_decode($responseKey, true); + + return json_decode(base64_decode($responseKey['privateKeyData']), true); + } + + public function cleanupServiceAccounts(string $accessToken, string $projectId) + { + // List Service Accounts + $response = $this->request( + 'GET', + 'https://iam.googleapis.com/v1/projects/' . $projectId . '/serviceAccounts', + [ + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Content-Type: application/json' + ] + ); + + $response = json_decode($response, true); + + if (empty($response['accounts'])) { + return false; + } + + foreach ($response['accounts'] as $account) { + if (strpos($account['email'], 'appwrite-') !== false) { + $this->request( + 'DELETE', + 'https://iam.googleapis.com/v1/projects/' . $projectId . '/serviceAccounts/' . $account['email'], + [ + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Content-Type: application/json' + ] + ); + } + } + + return true; + } +} diff --git a/src/Appwrite/Auth/OAuth2/Github.php b/src/Appwrite/Auth/OAuth2/Github.php index 8b9208fc06..1cefc397c5 100644 --- a/src/Appwrite/Auth/OAuth2/Github.php +++ b/src/Appwrite/Auth/OAuth2/Github.php @@ -208,4 +208,15 @@ class Github extends OAuth2 return $this->user; } + + public function createRepository(string $accessToken, string $repositoryName, bool $private): array + { + $repository = $this->request('POST', 'https://api.github.com/user/repos', ['Authorization: token ' . \urlencode($accessToken)], \json_encode([ + 'name' => $repositoryName, + 'private' => $private + ])); + + $repository = \json_decode($repository, true); + return $repository; + } } diff --git a/src/Appwrite/Detector/Detector.php b/src/Appwrite/Detector/Detector.php index 62f7a0a04b..61286835f5 100644 --- a/src/Appwrite/Detector/Detector.php +++ b/src/Appwrite/Detector/Detector.php @@ -77,10 +77,14 @@ class Detector */ public function getDevice(): array { + $deviceName = $this->getDetector()->getDeviceName(); + $deviceBrand = $this->getDetector()->getBrandName(); + $deviceModel = $this->getDetector()->getModel(); + return [ - 'deviceName' => $this->getDetector()->getDeviceName(), - 'deviceBrand' => $this->getDetector()->getBrandName(), - 'deviceModel' => $this->getDetector()->getModel(), + 'deviceName' => empty($deviceName) ? null : $deviceName, + 'deviceBrand' => empty($deviceBrand) ? null : $deviceBrand, + 'deviceModel' => empty($deviceModel) ? null : $deviceModel, ]; } diff --git a/src/Appwrite/Event/Build.php b/src/Appwrite/Event/Build.php index 4d4b338118..428b6aa832 100644 --- a/src/Appwrite/Event/Build.php +++ b/src/Appwrite/Event/Build.php @@ -10,12 +10,26 @@ class Build extends Event protected string $type = ''; protected ?Document $resource = null; protected ?Document $deployment = null; + protected ?Document $template = null; public function __construct() { parent::__construct(Event::BUILDS_QUEUE_NAME, Event::BUILDS_CLASS_NAME); } + /** + * Sets template for the build event. + * + * @param Document $template + * @return self + */ + public function setTemplate(Document $template): self + { + $this->template = $template; + + return $this; + } + /** * Sets resource document for the build event. * @@ -97,7 +111,8 @@ class Build extends Event 'project' => $this->project, 'resource' => $this->resource, 'deployment' => $this->deployment, - 'type' => $this->type + 'type' => $this->type, + 'template' => $this->template ]); } } diff --git a/src/Appwrite/Event/Delete.php b/src/Appwrite/Event/Delete.php index d1519121a6..8e593b1020 100644 --- a/src/Appwrite/Event/Delete.php +++ b/src/Appwrite/Event/Delete.php @@ -13,7 +13,6 @@ class Delete extends Event protected ?string $datetime = null; protected ?string $hourlyUsageRetentionDatetime = null; - public function __construct() { parent::__construct(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME); @@ -127,7 +126,7 @@ class Delete extends Event 'document' => $this->document, 'resource' => $this->resource, 'datetime' => $this->datetime, - 'hourlyUsageRetentionDatetime' => $this->hourlyUsageRetentionDatetime, + 'hourlyUsageRetentionDatetime' => $this->hourlyUsageRetentionDatetime ]); } } diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 0cf90eb3d3..23dde49637 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -38,6 +38,9 @@ class Event public const MESSAGING_QUEUE_NAME = 'v1-messaging'; public const MESSAGING_CLASS_NAME = 'MessagingV1'; + public const MIGRATIONS_QUEUE_NAME = 'v1-migrations'; + public const MIGRATIONS_CLASS_NAME = 'MigrationsV1'; + protected string $queue = ''; protected string $class = ''; protected string $event = ''; diff --git a/src/Appwrite/Event/Func.php b/src/Appwrite/Event/Func.php index d121b47a4a..b8c81cdc2d 100644 --- a/src/Appwrite/Event/Func.php +++ b/src/Appwrite/Event/Func.php @@ -10,7 +10,10 @@ class Func extends Event { protected string $jwt = ''; protected string $type = ''; - protected string $data = ''; + protected string $body = ''; + protected string $path = ''; + protected string $method = ''; + protected array $headers = []; protected ?Document $function = null; protected ?Document $execution = null; @@ -89,14 +92,53 @@ class Func extends Event } /** - * Sets custom data for the function event. + * Sets custom body for the function event. * - * @param string $data + * @param string $body * @return self */ - public function setData(string $data): self + public function setBody(string $body): self { - $this->data = $data; + $this->body = $body; + + return $this; + } + + /** + * Sets custom method for the function event. + * + * @param string $method + * @return self + */ + public function setMethod(string $method): self + { + $this->method = $method; + + return $this; + } + + /** + * Sets custom path for the function event. + * + * @param string $path + * @return self + */ + public function setPath(string $path): self + { + $this->path = $path; + + return $this; + } + + /** + * Sets custom headers for the function event. + * + * @param string $headers + * @return self + */ + public function setHeaders(array $headers): self + { + $this->headers = $headers; return $this; } @@ -159,7 +201,10 @@ class Func extends Event 'jwt' => $this->jwt, 'payload' => $this->payload, 'events' => $events, - 'data' => $this->data, + 'body' => $this->body, + 'path' => $this->path, + 'headers' => $this->headers, + 'method' => $this->method, ]); } diff --git a/src/Appwrite/Event/Mail.php b/src/Appwrite/Event/Mail.php index 37b42704c5..e1c015fb2b 100644 --- a/src/Appwrite/Event/Mail.php +++ b/src/Appwrite/Event/Mail.php @@ -8,11 +8,11 @@ use Utopia\Database\Document; class Mail extends Event { protected string $recipient = ''; - protected string $from = ''; protected string $name = ''; protected string $subject = ''; protected string $body = ''; protected array $smtp = []; + protected array $variables = []; public function __construct() { @@ -65,29 +65,6 @@ class Mail extends Event return $this->recipient; } - /** - * Sets from for the mail event. - * - * @param string $from - * @return self - */ - public function setFrom(string $from): self - { - $this->from = $from; - - return $this; - } - - /** - * Returns from for mail event. - * - * @return string - */ - public function getFrom(): string - { - return $this->from; - } - /** * Sets body for the mail event. * @@ -166,7 +143,7 @@ class Mail extends Event */ public function setSmtpUsername(string $username): self { - $this->smtp['username']; + $this->smtp['username'] = $username; return $this; } @@ -178,7 +155,19 @@ class Mail extends Event */ public function setSmtpPassword(string $password): self { - $this->smtp['password']; + $this->smtp['password'] = $password; + return $this; + } + + /** + * Set SMTP secure + * + * @param string $password + * @return self + */ + public function setSmtpSecure(string $secure): self + { + $this->smtp['secure'] = $secure; return $this; } @@ -194,6 +183,18 @@ class Mail extends Event return $this; } + /** + * Set SMTP sender name + * + * @param string $senderName + * @return self + */ + public function setSmtpSenderName(string $senderName): self + { + $this->smtp['senderName'] = $senderName; + return $this; + } + /** * Set SMTP reply to * @@ -246,6 +247,16 @@ class Mail extends Event return $this->smtp['password'] ?? ''; } + /** + * Get SMTP secure + * + * @return string + */ + public function getSmtpSecure(): string + { + return $this->smtp['secure'] ?? ''; + } + /** * Get SMTP sender email * @@ -256,6 +267,16 @@ class Mail extends Event return $this->smtp['senderEmail'] ?? ''; } + /** + * Get SMTP sender name + * + * @return string + */ + public function getSmtpSenderName(): string + { + return $this->smtp['senderName'] ?? ''; + } + /** * Get SMTP reply to * @@ -266,6 +287,28 @@ class Mail extends Event return $this->smtp['replyTo'] ?? ''; } + /** + * Get Email Variables + * + * @return array + */ + public function getVariables(): array + { + return $this->variables; + } + + /** + * Set Email Variables + * + * @param array $variables + * @return self + */ + public function setVariables(array $variables): self + { + $this->variables = $variables; + return $this; + } + /** * Executes the event and sends it to the mails worker. * @@ -275,12 +318,12 @@ class Mail extends Event public function trigger(): string|bool { return Resque::enqueue($this->queue, $this->class, [ - 'from' => $this->from, 'recipient' => $this->recipient, 'name' => $this->name, 'subject' => $this->subject, 'body' => $this->body, 'smtp' => $this->smtp, + 'variables' => $this->variables, 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) ]); } diff --git a/src/Appwrite/Event/Migration.php b/src/Appwrite/Event/Migration.php new file mode 100644 index 0000000000..4d53f16796 --- /dev/null +++ b/src/Appwrite/Event/Migration.php @@ -0,0 +1,98 @@ +migration = $migration; + + return $this; + } + + /** + * Returns set migration document for the function event. + * + * @return null|Document + */ + public function getMigration(): ?Document + { + return $this->migration; + } + + /** + * Sets migration type for the migration event. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Returns set migration type for the migration event. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Executes the migration event and sends it to the migrations worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'migration' => $this->migration + ]); + } + + /** + * Schedules the migration event and schedules it in the migrations worker queue. + * + * @param \DateTime|int $at + * @return void + * @throws \Resque_Exception + * @throws \ResqueScheduler_InvalidTimestampException + */ + public function schedule(DateTime|int $at): void + { + ResqueScheduler::enqueueAt($at, $this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'migration' => $this->migration + ]); + } +} diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 6b448db8ec..77dc03e310 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -32,6 +32,7 @@ class Exception extends \Exception * - Platform * - Domain * - GraphQL + * - Migrations */ /** General */ @@ -53,6 +54,7 @@ class Exception extends \Exception public const GENERAL_PROTOCOL_UNSUPPORTED = 'general_protocol_unsupported'; public const GENERAL_CODES_DISABLED = 'general_codes_disabled'; public const GENERAL_USAGE_DISABLED = 'general_usage_disabled'; + public const GENERAL_NOT_IMPLEMENTED = 'general_not_implemented'; /** Users */ public const USER_COUNT_EXCEEDED = 'user_count_exceeded'; @@ -73,6 +75,7 @@ class Exception extends \Exception public const USER_EMAIL_ALREADY_EXISTS = 'user_email_already_exists'; public const USER_PASSWORD_MISMATCH = 'user_password_mismatch'; public const USER_SESSION_NOT_FOUND = 'user_session_not_found'; + public const USER_IDENTITY_NOT_FOUND = 'user_identity_not_found'; public const USER_UNAUTHORIZED = 'user_unauthorized'; public const USER_AUTH_METHOD_UNSUPPORTED = 'user_auth_method_unsupported'; public const USER_PHONE_ALREADY_EXISTS = 'user_phone_already_exists'; @@ -103,6 +106,7 @@ class Exception extends \Exception public const AVATAR_ICON_NOT_FOUND = 'avatar_icon_not_found'; /** Storage */ + public const STORAGE_FILE_ALREADY_EXISTS = 'storage_file_already_exists'; public const STORAGE_FILE_NOT_FOUND = 'storage_file_not_found'; public const STORAGE_DEVICE_NOT_FOUND = 'storage_device_not_found'; public const STORAGE_FILE_EMPTY = 'storage_file_empty'; @@ -115,9 +119,17 @@ class Exception extends \Exception public const STORAGE_INVALID_RANGE = 'storage_invalid_range'; public const STORAGE_INVALID_APPWRITE_ID = 'storage_invalid_appwrite_id'; + /** VCS */ + public const INSTALLATION_NOT_FOUND = 'installation_not_found'; + public const PROVIDER_REPOSITORY_NOT_FOUND = 'provider_repository_not_found'; + public const REPOSITORY_NOT_FOUND = 'repository_not_found'; + public const PROVIDER_CONTRIBUTION_CONFLICT = 'provider_contribution_conflict'; + public const GENERAL_PROVIDER_FAILURE = 'general_provider_failure'; + /** Functions */ public const FUNCTION_NOT_FOUND = 'function_not_found'; public const FUNCTION_RUNTIME_UNSUPPORTED = 'function_runtime_unsupported'; + public const FUNCTION_ENTRYPOINT_MISSING = 'function_entrypoint_missing'; /** Deployments */ public const DEPLOYMENT_NOT_FOUND = 'deployment_not_found'; @@ -183,6 +195,16 @@ class Exception extends \Exception /** Webhooks */ public const WEBHOOK_NOT_FOUND = 'webhook_not_found'; + /** Router */ + public const ROUTER_HOST_NOT_FOUND = 'router_host_not_found'; + public const ROUTER_DOMAIN_NOT_CONFIGURED = 'router_domain_not_configured'; + + /** Proxy */ + public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found'; + public const RULE_NOT_FOUND = 'rule_not_found'; + public const RULE_ALREADY_EXISTS = 'rule_already_exists'; + public const RULE_VERIFICATION_FAILED = 'rule_verification_failed'; + /** Keys */ public const KEY_NOT_FOUND = 'key_not_found'; @@ -193,17 +215,15 @@ class Exception extends \Exception /** Platform */ public const PLATFORM_NOT_FOUND = 'platform_not_found'; - /** Domain */ - public const DOMAIN_NOT_FOUND = 'domain_not_found'; - public const DOMAIN_ALREADY_EXISTS = 'domain_already_exists'; - public const DOMAIN_FORBIDDEN = 'domain_forbidden'; - public const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed'; - public const DOMAIN_TARGET_INVALID = 'domain_target_invalid'; - /** GraphqQL */ public const GRAPHQL_NO_QUERY = 'graphql_no_query'; public const GRAPHQL_TOO_MANY_QUERIES = 'graphql_too_many_queries'; + /** Migrations */ + public const MIGRATION_NOT_FOUND = 'migration_not_found'; + public const MIGRATION_ALREADY_EXISTS = 'migration_already_exists'; + public const MIGRATION_IN_PROGRESS = 'migration_in_progress'; + protected $type = ''; protected $errors = []; diff --git a/src/Appwrite/GraphQL/Resolvers.php b/src/Appwrite/GraphQL/Resolvers.php index c143a93554..37bc1d922b 100644 --- a/src/Appwrite/GraphQL/Resolvers.php +++ b/src/Appwrite/GraphQL/Resolvers.php @@ -269,7 +269,7 @@ class Resolvers try { $route = $utopia->match($request, fresh: true); - $utopia->execute($route, $request); + $utopia->execute($route, $request, $response); } catch (\Throwable $e) { if ($beforeReject) { $e = $beforeReject($e); diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 0be60d93dc..0f9ad661f6 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -256,10 +256,12 @@ class Mapper case 'Appwrite\Utopia\Database\Validator\Queries\Indexes': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': + case 'Appwrite\Utopia\Database\Validator\Queries\Installations': case 'Utopia\Database\Validator\Queries\Documents': case 'Appwrite\Utopia\Database\Validator\Queries\Executions': case 'Appwrite\Utopia\Database\Validator\Queries\Files': case 'Appwrite\Utopia\Database\Validator\Queries\Functions': + case 'Appwrite\Utopia\Database\Validator\Queries\Rules': case 'Appwrite\Utopia\Database\Validator\Queries\Memberships': case 'Utopia\Database\Validator\Permissions': case 'Appwrite\Utopia\Database\Validator\Queries\Projects': diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 33fe484c13..1925944664 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -260,6 +260,11 @@ class Realtime extends Adapter $channels[] = 'account.' . $parts[1]; $roles = [Role::user(ID::custom($parts[1]))->toString()]; break; + case 'rules': + $channels[] = 'console'; + $projectId = 'console'; + $roles = [Role::team($project->getAttribute('teamId'))->toString()]; + break; case 'teams': if ($parts[2] === 'memberships') { $permissionsChanged = $parts[4] ?? false; @@ -325,6 +330,11 @@ class Realtime extends Adapter $roles = [Role::team($project->getAttribute('teamId'))->toString()]; } + break; + case 'migrations': + $channels[] = 'console'; + $projectId = 'console'; + $roles = [Role::team($project->getAttribute('teamId'))->toString()]; break; } diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 9ea3443091..a73fa47ca7 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -65,6 +65,7 @@ abstract class Migration '1.3.7' => 'V18', '1.3.8' => 'V18', '1.4.0' => 'V19', + '1.4.1' => 'V19', ]; /** @@ -77,7 +78,11 @@ abstract class Migration Authorization::disable(); Authorization::setDefaultStatus(false); - $this->collections = array_merge([ + $this->collections = Config::getParam('collections', []); + + $projectCollections = $this->collections['projects']; + + $this->collections['projects'] = array_merge([ '_metadata' => [ '$id' => ID::custom('_metadata'), '$collection' => Database::METADATA @@ -90,7 +95,7 @@ abstract class Migration '$id' => ID::custom('abuse'), '$collection' => Database::METADATA ] - ], Config::getParam('collections', [])); + ], $projectCollections); } /** @@ -131,7 +136,14 @@ abstract class Migration */ public function forEachDocument(callable $callback): void { - foreach ($this->collections as $collection) { + $internalProjectId = $this->project->getInternalId(); + + $collections = match ($internalProjectId) { + 'console' => $this->collections['console'], + default => $this->collections['projects'], + }; + + foreach ($collections as $collection) { if ($collection['$collection'] !== Database::METADATA) { continue; } @@ -148,12 +160,12 @@ abstract class Migration $old = $document->getArrayCopy(); $new = call_user_func($callback, $document); - if (is_null($new) || !self::hasDifference($new->getArrayCopy(), $old)) { + if (is_null($new) || $new->getArrayCopy() == $old) { return; } try { - $new = $this->projectDB->updateDocument($document->getCollection(), $document->getId(), $document); + $this->projectDB->updateDocument($document->getCollection(), $document->getId(), $document); } catch (\Throwable $th) { Console::error('Failed to update document: ' . $th->getMessage()); return; @@ -199,32 +211,6 @@ abstract class Migration } while (!is_null($nextDocument)); } - /** - * Checks 2 arrays for differences. - * - * @param array $array1 - * @param array $array2 - * @return bool - */ - public static function hasDifference(array $array1, array $array2): bool - { - foreach ($array1 as $key => $value) { - if (is_array($value)) { - if (!isset($array2[$key]) || !is_array($array2[$key])) { - return true; - } else { - if (self::hasDifference($value, $array2[$key])) { - return true; - } - } - } elseif (!array_key_exists($key, $array2) || $array2[$key] !== $value) { - return true; - } - } - - return false; - } - /** * Creates colletion from the config collection. * @@ -237,10 +223,15 @@ abstract class Migration { $name ??= $id; + $collectionType = match ($this->project->getInternalId()) { + 'console' => 'console', + default => 'projects', + }; + if (!$this->projectDB->exists(App::getEnv('_APP_DB_SCHEMA', 'appwrite'), $name)) { $attributes = []; $indexes = []; - $collection = $this->collections[$id]; + $collection = $this->collections[$collectionType][$id]; foreach ($collection['attributes'] as $attribute) { $attributes[] = new Document([ @@ -286,10 +277,22 @@ abstract class Migration public function createAttributeFromCollection(Database $database, string $collectionId, string $attributeId, string $from = null): void { $from ??= $collectionId; - $collection = Config::getParam('collections', [])[$from] ?? null; - if (is_null($collection)) { - throw new Exception("Collection {$collectionId} not found"); + + $collectionType = match ($this->project->getInternalId()) { + 'console' => 'console', + default => 'projects', + }; + + if ($from === 'files') { + $collectionType = 'buckets'; } + + $collection = $this->collections[$collectionType][$from] ?? null; + + if (is_null($collection)) { + throw new Exception("Collection {$from} not found"); + } + $attributes = $collection['attributes']; $attributeKey = array_search($attributeId, array_column($attributes, '$id')); @@ -332,17 +335,24 @@ abstract class Migration public function createIndexFromCollection(Database $database, string $collectionId, string $indexId, string $from = null): void { $from ??= $collectionId; - $collection = Config::getParam('collections', [])[$collectionId] ?? null; + + $collectionType = match ($this->project->getInternalId()) { + 'console' => 'console', + default => 'projects', + }; + + $collection = $this->collections[$collectionType][$from] ?? null; if (is_null($collection)) { throw new Exception("Collection {$collectionId} not found"); } + $indexes = $collection['indexes']; $indexKey = array_search($indexId, array_column($indexes, '$id')); if ($indexKey === false) { - throw new Exception("Attribute {$indexId} not found"); + throw new Exception("Index {$indexId} not found"); } $index = $indexes[$indexKey]; diff --git a/src/Appwrite/Migration/Version/V17.php b/src/Appwrite/Migration/Version/V17.php index 3f744d8069..c0e2498e7f 100644 --- a/src/Appwrite/Migration/Version/V17.php +++ b/src/Appwrite/Migration/Version/V17.php @@ -70,6 +70,18 @@ class V17 extends Migration $this->projectDB->setNamespace("_{$this->project->getInternalId()}"); switch ($id) { + case 'builds': + try { + /** + * Create 'size' attribute + */ + $this->createAttributeFromCollection($this->projectDB, $id, 'size'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'size' from {$id}: {$th->getMessage()}"); + } + + break; case 'files': try { /** diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index 75cd472ebb..d59aa8302c 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -2,12 +2,15 @@ namespace Appwrite\Migration\Version; -use Appwrite\Auth\Auth; -use Utopia\Config\Config; use Appwrite\Migration\Migration; +use Utopia\App; use Utopia\CLI\Console; +use Utopia\Config\Config; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Exception; +use Utopia\Database\Query; class V19 extends Migration { @@ -28,117 +31,48 @@ class V19 extends Migration Console::log('Migrating Project: ' . $this->project->getAttribute('name') . ' (' . $this->project->getId() . ')'); $this->projectDB->setNamespace("_{$this->project->getInternalId()}"); - $this->alterPermissionIndex('_metadata'); - - Console::info('Migrating Databases'); - $this->migrateDatabases(); - Console::info('Migrating Collections'); $this->migrateCollections(); + if ($this->project->getId() == 'console') { + Console::info('Migrating Domains'); + $this->migrateDomains(); + } + Console::info('Migrating Buckets'); $this->migrateBuckets(); Console::info('Migrating Documents'); $this->forEachDocument([$this, 'fixDocument']); + + Console::log('Cleaning Up Collections'); + $this->cleanCollections(); } - /** - * Migrate all Databases. - * - * @return void - * @throws \Exception - */ - private function migrateDatabases(): void + protected function migrateDomains(): void { - foreach ($this->documentsIterator('databases') as $database) { - Console::log("Migrating Collections of {$database->getId()} ({$database->getAttribute('name')})"); - - $databaseTable = "database_{$database->getInternalId()}"; - - $this->alterPermissionIndex($databaseTable); - - foreach ($this->documentsIterator($databaseTable) as $collection) { - $collectionTable = "{$databaseTable}_collection_{$collection->getInternalId()}"; - Console::log("Migrating Collections of {$collectionTable} {$collection->getId()} ({$collection->getAttribute('name')})"); - $this->alterPermissionIndex($collectionTable); - } - } - } - - /** - * Migrate all Collections. - * - * @return void - */ - private function migrateCollections(): void - { - foreach ($this->collections as $collection) { - $id = $collection['$id']; - - Console::log("Migrating Collection \"{$id}\""); - - $this->projectDB->setNamespace("_{$this->project->getInternalId()}"); - - switch ($id) { - case 'projects': - try { - /** - * Create 'passwordHistory' attribute - */ - $this->createAttributeFromCollection($this->projectDB, $id, 'smtp'); - $this->createAttributeFromCollection($this->projectDB, $id, 'templates'); - $this->projectDB->deleteCachedCollection($id); - } catch (\Throwable $th) { - Console::warning("'SMTP and Templates' from {$id}: {$th->getMessage()}"); - } - break; - default: - break; - } - if (!in_array($id, ['files', 'collections'])) { - $this->alterPermissionIndex($id); + foreach ($this->documentsIterator('domains') as $domain) { + $status = 'created'; + if ($domain->getAttribute('verification', false)) { + $status = 'verified'; } - usleep(50000); - } - } + $ruleDocument = new Document([ + 'projectId' => $domain->getAttribute('projectId'), + 'projectInternalId' => $domain->getAttribute('projectInternalId'), + 'domain' => $domain->getAttribute('domain'), + 'resourceType' => 'api', + 'resourceInternalId' => '', + 'resourceId' => '', + 'status' => $status, + 'certificateId' => $domain->getAttribute('certificateId'), + ]); - /** - * Fix run on each document - * - * @param Document $document - * @return Document - */ - protected function fixDocument(Document $document): Document - { - switch ($document->getCollection()) { - case 'projects': - /** - * Bump version number. - */ - $document->setAttribute('version', '1.4.0'); - - $document->setAttribute('smtp', []); - $document->setAttribute('templates', []); - - break; - } - - return $document; - } - - protected function alterPermissionIndex($collectionName): void - { - try { - $table = "`{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collectionName}_perms"; - $this->pdo->prepare(" - ALTER TABLE {$table} - DROP INDEX `_permission`, - ADD INDEX `_permission` (`_permission`, `_type`, `_document`); - ")->execute(); - } catch (\Throwable $th) { - Console::warning($th->getMessage()); + try { + $this->consoleDB->createDocument('rules', $ruleDocument); + } catch (\Throwable $th) { + Console::warning("Error migrating domain {$domain->getAttribute('domain')}: {$th->getMessage()}"); + } } } @@ -154,7 +88,600 @@ class V19 extends Migration foreach ($this->documentsIterator('buckets') as $bucket) { $id = "bucket_{$bucket->getInternalId()}"; Console::log("Migrating Bucket {$id} {$bucket->getId()} ({$bucket->getAttribute('name')})"); - $this->alterPermissionIndex($id); + + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'bucketInternalId', 'files'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'bucketInternalId' from {$id}: {$th->getMessage()}"); + } } } + + /** + * Migrate all Collections. + * + * @return void + * @throws \Throwable + * @throws Exception + */ + private function migrateCollections(): void + { + $internalProjectId = $this->project->getInternalId(); + $collectionType = match ($internalProjectId) { + 'console' => 'console', + default => 'projects', + }; + $collections = $this->collections[$collectionType]; + foreach ($collections as $collection) { + $id = $collection['$id']; + + if ($id === 'schedules' && $internalProjectId === 'console') { + continue; + } + + Console::log("Migrating Collection \"{$id}\""); + + $this->projectDB->setNamespace("_$internalProjectId"); + + switch ($id) { + case '_metadata': + $this->createCollection('identities'); + $this->createCollection('migrations'); + // Holding off on this until a future release + // $this->createCollection('statsLogger'); + break; + case 'attributes': + case 'indexes': + try { + $this->projectDB->updateAttribute($id, 'databaseInternalId', required: true); + } catch (\Throwable $th) { + Console::warning("'databaseInternalId' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->updateAttribute($id, 'collectionInternalId', required: true); + } catch (\Throwable $th) { + Console::warning("'collectionInternalId' from {$id}: {$th->getMessage()}"); + } + + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'error'); + } catch (\Throwable $th) { + Console::warning("'error' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'buckets': + // Recreate indexes so they're the right size + $indexesToDelete = [ + '_key_name', + ]; + foreach ($indexesToDelete as $index) { + try { + $this->projectDB->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $indexesToCreate = [ + ...$indexesToDelete + ]; + + foreach ($indexesToCreate as $index) { + try { + $this->createIndexFromCollection($this->projectDB, $id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'builds': + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'deploymentInternalId'); + } catch (\Throwable $th) { + Console::warning("'deploymentInternalId' from {$id}: {$th->getMessage()}"); + } + + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'logs'); + } catch (\Throwable $th) { + Console::warning("'logs' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'certificates': + try { + $this->projectDB->renameAttribute($id, 'log', 'logs'); + } catch (\Throwable $th) { + Console::warning("'errors' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->updateAttribute($id, 'logs', size: 1000000); + } catch (\Throwable $th) { + Console::warning("'errors' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'databases': + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'enabled'); + } catch (\Throwable $th) { + Console::warning("'enabled' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'deployments': + $attributesToCreate = [ + 'resourceInternalId', + 'buildInternalId', + 'type', + ]; + foreach ($attributesToCreate as $attribute) { + try { + $this->createAttributeFromCollection($this->projectDB, $id, $attribute); + } catch (\Throwable $th) { + Console::warning("$attribute from {$id}: {$th->getMessage()}"); + } + } + + // Recreate indexes so they're the right size + $indexesToDelete = [ + '_key_entrypoint', + '_key_resource', + '_key_resource_type', + '_key_buildId', + ]; + foreach ($indexesToDelete as $index) { + try { + $this->projectDB->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $indexesToCreate = [ + '_key_resource', + '_key_resource_type', + '_key_buildId', + ]; + foreach ($indexesToCreate as $index) { + try { + $this->createIndexFromCollection($this->projectDB, $id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'executions': + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'functionInternalId'); + } catch (\Throwable $th) { + Console::warning("'functionInternalId' from {$id}: {$th->getMessage()}"); + } + + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'deploymentInternalId'); + } catch (\Throwable $th) { + Console::warning("'deploymentInternalId' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->renameAttribute($id, 'stderr', 'errors'); + } catch (\Throwable $th) { + Console::warning("'errors' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->renameAttribute($id, 'stdout', 'logs'); + } catch (\Throwable $th) { + Console::warning("'logs' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->renameAttribute($id, 'statusCode', 'responseStatusCode'); + } catch (\Throwable $th) { + Console::warning("'responseStatusCode' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'files': + // Recreate indexes so they're the right size + $indexesToDelete = [ + '_key_name', + '_key_signature', + '_key_mimeType', + ]; + foreach ($indexesToDelete as $index) { + try { + $this->projectDB->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $indexesToCreate = $indexesToDelete; + foreach ($indexesToCreate as $index) { + try { + $this->createIndexFromCollection($this->projectDB, $id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'functions': + $attributesToCreate = [ + 'live', + 'installationId', + 'installationInternalId', + 'providerRepositoryId', + 'repositoryId', + 'repositoryInternalId', + 'providerBranch', + 'providerRootDirectory', + 'providerSilentMode', + 'logging', + 'deploymentInternalId', + 'scheduleInternalId', + 'scheduleId', + 'version', + 'entrypoint', + 'commands', + ]; + foreach ($attributesToCreate as $attribute) { + try { + $this->createAttributeFromCollection($this->projectDB, $id, $attribute); + } catch (\Throwable $th) { + Console::warning("'$attribute' from {$id}: {$th->getMessage()}"); + } + } + + // Recreate indexes so they're the right size + $indexesToDelete = [ + '_key_name', + '_key_runtime', + '_key_deployment', + ]; + foreach ($indexesToDelete as $index) { + try { + $this->projectDB->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $indexesToCreate = [ + ...$indexesToDelete, + '_key_installationId', + '_key_installationInternalId', + '_key_providerRepositoryId', + '_key_repositoryId', + '_key_repositoryInternalId', + ]; + foreach ($indexesToCreate as $index) { + try { + $this->createIndexFromCollection($this->projectDB, $id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'memberships': + try { + $this->projectDB->updateAttribute($id, 'teamInternalId', required: true); + } catch (\Throwable $th) { + Console::warning("'teamInternalId' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + // Intentional fall through to update memberships.userInternalId + case 'sessions': + case 'tokens': + try { + $this->projectDB->updateAttribute($id, 'userInternalId', required: true); + } catch (\Throwable $th) { + Console::warning("'userInternalId' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'domains': + case 'keys': + case 'platforms': + case 'webhooks': + try { + $this->projectDB->updateAttribute($id, 'projectInternalId', required: true); + } catch (\Throwable $th) { + Console::warning("'projectInternalId' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'projects': + $attributesToCreate = [ + 'database', + 'smtp', + 'templates', + ]; + foreach ($attributesToCreate as $attribute) { + try { + $this->createAttributeFromCollection($this->projectDB, $id, $attribute); + } catch (\Throwable $th) { + Console::warning("'$attribute' from {$id}: {$th->getMessage()}"); + Console::warning($th->getTraceAsString()); + } + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'stats': + try { + $this->projectDB->updateAttribute($id, 'value', signed: true); + } catch (\Throwable $th) { + Console::warning("'value' from {$id}: {$th->getMessage()}"); + } + + // Holding off on these until a future release + // try { + // $this->projectDB->deleteAttribute($id, 'type'); + // $this->projectDB->deleteCachedCollection($id); + // } catch (\Throwable $th) { + // Console::warning("'type' from {$id}: {$th->getMessage()}"); + // } + + // try { + // $this->projectDB->deleteIndex($id, '_key_metric_period_time'); + // $this->projectDB->deleteCachedCollection($id); + // } catch (\Throwable $th) { + // Console::warning("'_key_metric_period_time' from {$id}: {$th->getMessage()}"); + // } + + // try { + // $this->createIndexFromCollection($this->projectDB, $id, '_key_metric_period_time'); + // $this->projectDB->deleteCachedCollection($id); + // } catch (\Throwable $th) { + // Console::warning("'_key_metric_period_time' from {$id}: {$th->getMessage()}"); + // } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'users': + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'labels'); + } catch (\Throwable $th) { + Console::warning("'labels' from {$id}: {$th->getMessage()}"); + } + + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'accessedAt'); + } catch (\Throwable $th) { + Console::warning("'accessedAt' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->updateAttribute($id, 'search', filters: ['userSearch']); + } catch (\Throwable $th) { + Console::warning("'search' from {$id}: {$th->getMessage()}"); + } + + try { + $this->createIndexFromCollection($this->projectDB, $id, '_key_accessedAt'); + } catch (\Throwable $th) { + Console::warning("'_key_accessedAt' from {$id}: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection($id); + + break; + case 'variables': + try { + $this->projectDB->deleteIndex($id, '_key_function'); + } catch (\Throwable $th) { + Console::warning("'_key_function' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->deleteIndex($id, '_key_uniqueKey'); + } catch (\Throwable $th) { + Console::warning("'_key_uniqueKey' from {$id}: {$th->getMessage()}"); + } + + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'resourceType'); + } catch (\Throwable $th) { + Console::warning("'resourceType' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->renameAttribute($id, 'functionInternalId', 'resourceInternalId'); + } catch (\Throwable $th) { + Console::warning("'resourceInternalId' from {$id}: {$th->getMessage()}"); + } + + try { + $this->projectDB->renameAttribute($id, 'functionId', 'resourceId'); + } catch (\Throwable $th) { + Console::warning("'resourceId' from {$id}: {$th->getMessage()}"); + } + + $indexesToCreate = [ + '_key_resourceInternalId', + '_key_resourceId_resourceType', + '_key_resourceType', + '_key_uniqueKey', + ]; + foreach ($indexesToCreate as $index) { + try { + $this->createIndexFromCollection($this->projectDB, $id, $index); + } catch (\Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + + $this->projectDB->deleteCachedCollection($id); + + break; + default: + break; + } + + usleep(50000); + } + } + + /** + * Fix run on each document + * + * @param Document $document + * @return Document + */ + protected function fixDocument(Document $document): Document + { + switch ($document->getCollection()) { + case 'attributes': + case 'indexes': + $status = $document->getAttribute('status', ''); + if ($status === 'failed') { + $document->setAttribute('error', 'Unknown problem'); + } + break; + case 'builds': + $deploymentId = $document->getAttribute('deploymentId'); + $deployment = $this->projectDB->getDocument('deployments', $deploymentId); + $document->setAttribute('deploymentInternalId', $deployment->getInternalId()); + + $stdout = $document->getAttribute('stdout', ''); + $stderr = $document->getAttribute('stderr', ''); + $document->setAttribute('logs', $stdout . PHP_EOL . $stderr); + break; + case 'databases': + $document->setAttribute('enabled', true); + break; + case 'deployments': + $resourceId = $document->getAttribute('resourceId'); + $function = $this->projectDB->getDocument('functions', $resourceId); + $document->setAttribute('resourceInternalId', $function->getInternalId()); + + $buildId = $document->getAttribute('buildId'); + if (!empty($buildId)) { + $build = $this->projectDB->getDocument('builds', $buildId); + $document->setAttribute('buildInternalId', $build->getInternalId()); + } + + $document->setAttribute('type', 'manual'); + break; + case 'executions': + $functionId = $document->getAttribute('functionId'); + $function = $this->projectDB->getDocument('functions', $functionId); + $document->setAttribute('functionInternalId', $function->getInternalId()); + + $deploymentId = $document->getAttribute('deploymentId'); + $deployment = $this->projectDB->getDocument('deployments', $deploymentId); + $document->setAttribute('deploymentInternalId', $deployment->getInternalId()); + break; + case 'functions': + $document->setAttribute('live', true); + $document->setAttribute('logging', true); + $document->setAttribute('version', 'v2'); + $deploymentId = $document->getAttribute('deployment'); + + if (!empty($deploymentId)) { + $deployment = $this->projectDB->getDocument('deployments', $deploymentId); + $document->setAttribute('deploymentInternalId', $deployment->getInternalId()); + $document->setAttribute('entrypoint', $deployment->getAttribute('entrypoint')); + } + + $schedule = $this->consoleDB->createDocument('schedules', new Document([ + 'region' => App::getEnv('_APP_REGION', 'default'), // Todo replace with projects region + 'resourceType' => 'function', + 'resourceId' => $document->getId(), + 'resourceInternalId' => $document->getInternalId(), + 'resourceUpdatedAt' => DateTime::now(), + 'projectId' => $this->project->getId(), + 'schedule' => $document->getAttribute('schedule'), + 'active' => !empty($document->getAttribute('schedule')) && !empty($document->getAttribute('deployment')), + ])); + + $document->setAttribute('scheduleId', $schedule->getId()); + $document->setAttribute('scheduleInternalId', $schedule->getInternalId()); + break; + case 'projects': + $document->setAttribute('version', '1.4.0'); + + $databases = Config::getParam('pools-database', []); + $database = $databases[0]; + + $document->setAttribute('database', $database); + $document->setAttribute('smtp', []); + $document->setAttribute('templates', []); + + break; + default: + break; + } + + return $document; + } + + private function cleanCollections(): void + { + try { + $this->projectDB->deleteAttribute('projects', 'domains'); + } catch (\Throwable $th) { + Console::warning("'domains' from projects: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection('projects'); + + try { + $this->projectDB->deleteAttribute('functions', 'schedule'); + } catch (\Throwable $th) { + Console::warning("'schedule' from functions: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection('functions'); + + try { + $this->projectDB->deleteAttribute('builds', 'stderr'); + } catch (\Throwable $th) { + Console::warning("'stderr' from builds: {$th->getMessage()}"); + } + + try { + $this->projectDB->deleteAttribute('builds', 'stdout'); + } catch (\Throwable $th) { + Console::warning("'stdout' from builds: {$th->getMessage()}"); + } + + $this->projectDB->deleteCachedCollection('builds'); + } } diff --git a/src/Appwrite/Platform/Services/Tasks.php b/src/Appwrite/Platform/Services/Tasks.php index 9e919127bf..bc8d1bbc72 100644 --- a/src/Appwrite/Platform/Services/Tasks.php +++ b/src/Appwrite/Platform/Services/Tasks.php @@ -22,6 +22,7 @@ use Appwrite\Platform\Tasks\VolumeSync; use Appwrite\Platform\Tasks\CalcUsersStats; use Appwrite\Platform\Tasks\CalcTierStats; use Appwrite\Platform\Tasks\PatchDeleteProjectCollections; +use Appwrite\Platform\Tasks\Upgrade; class Tasks extends Service { @@ -30,11 +31,13 @@ class Tasks extends Service $this->type = self::TYPE_CLI; $this ->addAction(Version::getName(), new Version()) + ->addAction(Usage::getName(), new Usage()) ->addAction(Vars::getName(), new Vars()) ->addAction(SSL::getName(), new SSL()) ->addAction(Hamster::getName(), new Hamster()) ->addAction(Doctor::getName(), new Doctor()) ->addAction(Install::getName(), new Install()) + ->addAction(Upgrade::getName(), new Upgrade()) ->addAction(Maintenance::getName(), new Maintenance()) ->addAction(PatchCreateMissingSchedules::getName(), new PatchCreateMissingSchedules()) ->addAction(ClearCardCache::getName(), new ClearCardCache()) diff --git a/src/Appwrite/Platform/Tasks/Install.php b/src/Appwrite/Platform/Tasks/Install.php index be12eadf62..22355d0269 100644 --- a/src/Appwrite/Platform/Tasks/Install.php +++ b/src/Appwrite/Platform/Tasks/Install.php @@ -6,7 +6,9 @@ use Appwrite\Auth\Auth; use Appwrite\Docker\Compose; use Appwrite\Docker\Env; use Appwrite\Utopia\View; -use Utopia\Analytics\GoogleAnalytics; +use Utopia\Analytics\Adapter; +use Utopia\Analytics\Adapter\GoogleAnalytics; +use Utopia\Analytics\Event; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Validator\Text; @@ -14,6 +16,8 @@ use Utopia\Platform\Action; class Install extends Action { + protected string $path = '/usr/src/code/appwrite'; + public static function getName(): string { return 'install'; @@ -33,24 +37,7 @@ class Install extends Action public function action(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive): void { - /** - * 1. Start - DONE - * 2. Check for older setup and get older version - DONE - * 2.1 If older version is equal or bigger(?) than current version, **stop setup** - * 2.2. Get ENV vars - DONE - * 2.2.1 Fetch from older docker-compose.yml file - * 2.2.2 Fetch from older .env file (manually parse) - * 2.3 Use old ENV vars as default values - * 2.4 Ask for all required vars not given as CLI args and if in interactive mode - * Otherwise, just use default vars. - DONE - * 3. Ask user to backup important volumes, env vars, and SQL tables - * In th future we can try and automate this for smaller/medium size setups - * 4. Drop new docker-compose.yml setup (located inside the container, no network dependencies with appwrite.io) - DONE - * 5. Run docker compose up -d - DONE - * 6. Run data migration - */ $config = Config::getParam('variables'); - $path = '/usr/src/code/appwrite'; $defaultHTTPPort = '80'; $defaultHTTPSPort = '443'; $vars = []; @@ -70,19 +57,28 @@ class Install extends Action Console::success('Starting Appwrite installation...'); // Create directory with write permissions - if (null !== $path && !\file_exists(\dirname($path))) { - if (!@\mkdir(\dirname($path), 0755, true)) { - Console::error('Can\'t create directory ' . \dirname($path)); + if (!\file_exists(\dirname($this->path))) { + if (!@\mkdir(\dirname($this->path), 0755, true)) { + Console::error('Can\'t create directory ' . \dirname($this->path)); Console::exit(1); } } - $data = @file_get_contents($path . '/docker-compose.yml'); + $data = @file_get_contents($this->path . '/docker-compose.yml'); if ($data !== false) { + if ($interactive == 'Y' && Console::isInteractive()) { + $answer = Console::confirm('Previous installation found, do you want to overwrite it (a backup will be created before overwriting)? (Y/n)'); + + if ($answer !== 'Y') { + Console::info('No action taken.'); + return; + } + } + $time = \time(); Console::info('Compose file found, creating backup: docker-compose.yml.' . $time . '.backup'); - file_put_contents($path . '/docker-compose.yml.' . $time . '.backup', $data); + file_put_contents($this->path . '/docker-compose.yml.' . $time . '.backup', $data); $compose = new Compose($data); $appwrite = $compose->getService('appwrite'); $oldVersion = ($appwrite) ? $appwrite->getImageVersion() : null; @@ -116,11 +112,11 @@ class Install extends Action } } - $data = @file_get_contents($path . '/.env'); + $data = @file_get_contents($this->path . '/.env'); if ($data !== false) { // Fetch all env vars from previous .env file Console::info('Env file found, creating backup: .env.' . $time . '.backup'); - file_put_contents($path . '/.env.' . $time . '.backup', $data); + file_put_contents($this->path . '/.env.' . $time . '.backup', $data); $env = new Env($data); foreach ($env->list() as $key => $value) { @@ -198,31 +194,28 @@ class Install extends Action } } - $templateForCompose = new View(__DIR__ . '/../views/install/compose.phtml'); - $templateForEnv = new View(__DIR__ . '/../views/install/env.phtml'); + $templateForCompose = new View(__DIR__ . '/../../../../app/views/install/compose.phtml'); + $templateForEnv = new View(__DIR__ . '/../../../../app/views/install/env.phtml'); $templateForCompose ->setParam('httpPort', $httpPort) ->setParam('httpsPort', $httpsPort) ->setParam('version', APP_VERSION_STABLE) ->setParam('organization', $organization) - ->setParam('image', $image) - ; + ->setParam('image', $image); - $templateForEnv - ->setParam('vars', $input) - ; + $templateForEnv->setParam('vars', $input); - if (!file_put_contents($path . '/docker-compose.yml', $templateForCompose->render(false))) { + if (!file_put_contents($this->path . '/docker-compose.yml', $templateForCompose->render(false))) { $message = 'Failed to save Docker Compose file'; - $analytics->createEvent('install/server', 'install', APP_VERSION_STABLE . ' - ' . $message); + $this->sendEvent($analytics, $message); Console::error($message); Console::exit(1); } - if (!file_put_contents($path . '/.env', $templateForEnv->render(false))) { + if (!file_put_contents($this->path . '/.env', $templateForEnv->render(false))) { $message = 'Failed to save environment variables file'; - $analytics->createEvent('install/server', 'install', APP_VERSION_STABLE . ' - ' . $message); + $this->sendEvent($analytics, $message); Console::error($message); Console::exit(1); } @@ -239,18 +232,33 @@ class Install extends Action Console::log("Running \"docker compose up -d --remove-orphans --renew-anon-volumes\""); - $exit = Console::execute("${env} docker compose --project-directory {$path} up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr); + $exit = Console::execute("$env docker compose --project-directory $this->path up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr); if ($exit !== 0) { $message = 'Failed to install Appwrite dockers'; - $analytics->createEvent('install/server', 'install', APP_VERSION_STABLE . ' - ' . $message); + $this->sendEvent($analytics, $message); Console::error($message); Console::error($stderr); Console::exit($exit); } else { $message = 'Appwrite installed successfully'; - $analytics->createEvent('install/server', 'install', APP_VERSION_STABLE . ' - ' . $message); + $this->sendEvent($analytics, $message); Console::success($message); } } + + private function sendEvent(Adapter $analytics, string $message): void + { + $event = new Event(); + $event->setName(APP_VERSION_STABLE); + $event->setValue($message); + $event->setUrl('http://localhost/'); + $event->setProps([ + 'category' => 'install/server', + 'action' => 'install', + ]); + $event->setType('install/server'); + + $analytics->createEvent($event); + } } diff --git a/src/Appwrite/Platform/Tasks/Maintenance.php b/src/Appwrite/Platform/Tasks/Maintenance.php index 0739923e34..eb98b1bb3b 100644 --- a/src/Appwrite/Platform/Tasks/Maintenance.php +++ b/src/Appwrite/Platform/Tasks/Maintenance.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Tasks; -use Appwrite\Auth\Auth; use Appwrite\Event\Certificate; use Appwrite\Event\Delete; use Utopia\App; @@ -109,7 +108,6 @@ class Maintenance extends Action function notifyDeleteCache($interval) { - (new Delete()) ->setType(DELETE_TYPE_CACHE_BY_TIMESTAMP) ->setDatetime(DateTime::addSeconds(new \DateTime(), -1 * $interval)) @@ -118,7 +116,6 @@ class Maintenance extends Action function notifyDeleteSchedules($interval) { - (new Delete()) ->setType(DELETE_TYPE_SCHEDULES) ->setDatetime(DateTime::addSeconds(new \DateTime(), -1 * $interval)) diff --git a/src/Appwrite/Platform/Tasks/Migrate.php b/src/Appwrite/Platform/Tasks/Migrate.php index 90b4234109..38e5c8aa46 100644 --- a/src/Appwrite/Platform/Tasks/Migrate.php +++ b/src/Appwrite/Platform/Tasks/Migrate.php @@ -7,10 +7,10 @@ use Utopia\CLI\Console; use Appwrite\Migration\Migration; use Utopia\App; use Utopia\Cache\Cache; -use Utopia\Cache\Adapter\Redis as RedisCache; +use Utopia\Database\Database; use Utopia\Database\Document; +use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; -use Utopia\Registry\Registry; use Utopia\Validator\Text; class Migrate extends Action @@ -26,20 +26,22 @@ class Migrate extends Action ->desc('Migrate Appwrite to new version') /** @TODO APP_VERSION_STABLE needs to be defined */ ->param('version', APP_VERSION_STABLE, new Text(8), 'Version to migrate to.', true) - ->inject('register') - ->callback(fn ($version, $register) => $this->action($version, $register)); + ->inject('cache') + ->inject('dbForConsole') + ->inject('getProjectDB') + ->callback(fn ($version, $cache, $dbForConsole, $getProjectDB) => $this->action($version, $cache, $dbForConsole, $getProjectDB)); } - private function clearProjectsCache(Redis $redis, Document $project) + private function clearProjectsCache(Cache $cache, Document $project) { try { - $redis->del($redis->keys("cache-_{$project->getInternalId()}:*")); + $cache->purge("cache-_{$project->getInternalId()}:*"); } catch (\Throwable $th) { Console::error('Failed to clear project ("' . $project->getId() . '") cache with error: ' . $th->getMessage()); } } - public function action(string $version, Registry $register) + public function action(string $version, Cache $cache, Database $dbForConsole, callable $getProjectDB) { Authorization::disable(); if (!array_key_exists($version, Migration::$versions)) { @@ -52,14 +54,6 @@ class Migrate extends Action Console::success('Starting Data Migration to version ' . $version); - $dbPool = $register->get('dbPool', true); - $redis = $register->get('cache', true); - - $cache = new Cache(new RedisCache($redis)); - - $dbForConsole = $dbPool->getDB('console', $cache); - $dbForConsole->setNamespace('_project_console'); - $console = $app->getResource('console'); $limit = 30; @@ -79,6 +73,7 @@ class Migrate extends Action } $class = 'Appwrite\\Migration\\Version\\' . Migration::$versions[$version]; + /** @var Migration $migration */ $migration = new $class(); while (!empty($projects)) { @@ -90,11 +85,11 @@ class Migrate extends Action continue; } - $this->clearProjectsCache($redis, $project); + $this->clearProjectsCache($cache, $project); try { // TODO: Iterate through all project DBs - $projectDB = $dbPool->getDB($project->getId(), $cache); + $projectDB = $getProjectDB($project); $migration ->setProject($project, $projectDB, $dbForConsole) ->execute(); @@ -103,11 +98,11 @@ class Migrate extends Action throw $th; } - $this->clearProjectsCache($redis, $project); + $this->clearProjectsCache($cache, $project); } $sum = \count($projects); - $projects = $dbForConsole->find('projects', limit: $limit, offset: $offset); + $projects = $dbForConsole->find('projects', [Query::limit($limit), Query::offset($offset)]); $offset = $offset + $limit; $count = $count + $sum; @@ -115,7 +110,6 @@ class Migrate extends Action Console::log('Migrated ' . $count . '/' . $totalProjects . ' projects...'); } - Swoole\Event::wait(); // Wait for Coroutines to finish Console::success('Data Migration Completed'); } } diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index f70ae8bd60..a052acf373 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -51,7 +51,7 @@ class SDKs extends Action $production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false; $message = ($git) ? Console::confirm('Please enter your commit message:') : ''; - if (!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', '1.2.x', '1.3.x', 'latest'])) { + if (!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', '1.2.x', '1.3.x', '1.4.x', 'latest'])) { throw new Exception('Unknown version given'); } @@ -232,7 +232,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ->setTwitter(APP_SOCIAL_TWITTER_HANDLE) ->setDiscord(APP_SOCIAL_DISCORD_CHANNEL, APP_SOCIAL_DISCORD) ->setDefaultHeaders([ - 'X-Appwrite-Response-Format' => '1.0.0', + 'X-Appwrite-Response-Format' => '1.4.0', ]); try { diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 82caf8ef72..2a22c59103 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -40,8 +40,6 @@ class Specs extends Action public function action(string $version, string $mode, Registry $register): void { - //$db = $register->get('db'); - //$redis = $register->get('cache'); $appRoutes = App::getRoutes(); $response = new Response(new HttpResponse()); $mocks = ($mode === 'mocks'); diff --git a/src/Appwrite/Platform/Tasks/Upgrade.php b/src/Appwrite/Platform/Tasks/Upgrade.php new file mode 100644 index 0000000000..e3f0458394 --- /dev/null +++ b/src/Appwrite/Platform/Tasks/Upgrade.php @@ -0,0 +1,42 @@ +desc('Upgrade Appwrite') + ->param('httpPort', '', new Text(4), 'Server HTTP port', true) + ->param('httpsPort', '', new Text(4), 'Server HTTPS port', true) + ->param('organization', 'appwrite', new Text(0), 'Docker Registry organization', true) + ->param('image', 'appwrite', new Text(0), 'Main appwrite docker image', true) + ->param('interactive', 'Y', new Text(1), 'Run an interactive session', true) + ->callback(fn ($httpPort, $httpsPort, $organization, $image, $interactive) => $this->action($httpPort, $httpsPort, $organization, $image, $interactive)); + } + + public function action(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive): void + { + // Check for previous installation + $data = @file_get_contents($this->path . '/docker-compose.yml'); + if (empty($data)) { + Console::error('Appwrite installation not found.'); + Console::log('The command was not run in the parent folder of your appwrite installation.'); + Console::log('Please navigate to the parent directory of the Appwrite installation and try again.'); + Console::log(' parent_directory <= you run the command in this directory'); + Console::log(' └── appwrite'); + Console::log(' └── docker-compose.yml'); + Console::exit(1); + } + parent::action($httpPort, $httpsPort, $organization, $image, $interactive); + } +} diff --git a/src/Appwrite/Platform/Tasks/Usage.php b/src/Appwrite/Platform/Tasks/Usage.php new file mode 100644 index 0000000000..fa677ea142 --- /dev/null +++ b/src/Appwrite/Platform/Tasks/Usage.php @@ -0,0 +1,60 @@ +desc('Schedules syncing data from influxdb to Appwrite console db') + ->inject('dbForConsole') + ->inject('influxdb') + ->inject('register') + ->inject('getProjectDB') + ->inject('logError') + ->callback(fn ($dbForConsole, $influxDB, $register, $getProjectDB, $logError) => $this->action($dbForConsole, $influxDB, $register, $getProjectDB, $logError)); + } + + protected function aggregateTimeseries(UtopiaDatabase $database, InfluxDatabase $influxDB, callable $logError): void + { + } + + public function action(UtopiaDatabase $dbForConsole, InfluxDatabase $influxDB, Registry $register, callable $getProjectDB, callable $logError) + { + Console::title('Usage Aggregation V1'); + Console::success(APP_NAME . ' usage aggregation process v1 has started'); + + $errorLogger = fn(Throwable $error, string $action = 'syncUsageStats') => $logError($error, "usage", $action); + + $interval = (int) App::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '30'); // 30 seconds (by default) + $region = App::getEnv('region', 'default'); + $usage = new TimeSeries($region, $dbForConsole, $influxDB, $getProjectDB, $register, $errorLogger); + + Console::loop(function () use ($interval, $usage) { + $now = date('d-m-Y H:i:s', time()); + Console::info("[{$now}] Aggregating Timeseries Usage data every {$interval} seconds"); + $loopStart = microtime(true); + + $usage->collect(); + + $loopTook = microtime(true) - $loopStart; + $now = date('d-m-Y H:i:s', time()); + Console::info("[{$now}] Aggregation took {$loopTook} seconds"); + }, $interval); + } +} diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 146500e743..7693f1e6ff 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -223,7 +223,7 @@ abstract class Worker if (isset(self::$databases[$databaseName])) { $database = self::$databases[$databaseName]; - $database->setNamespace('console'); + $database->setNamespace('_console'); return $database; } @@ -237,7 +237,7 @@ abstract class Worker self::$databases[$databaseName] = $database; - $database->setNamespace('console'); + $database->setNamespace('_console'); return $database; } @@ -328,38 +328,82 @@ abstract class Worker public function getDevice(string $root): Device { $connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); - $acl = 'private'; - $device = Storage::DEVICE_LOCAL; - $accessKey = ''; - $accessSecret = ''; - $bucket = ''; - $region = ''; - try { - $dsn = new DSN($connection); - $device = $dsn->getScheme(); - $accessKey = $dsn->getUser(); - $accessSecret = $dsn->getPassword(); - $bucket = $dsn->getPath(); - $region = $dsn->getParam('region'); - } catch (\Exception $e) { - Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.'); - } + if (!empty($connection)) { + $acl = 'private'; + $device = Storage::DEVICE_LOCAL; + $accessKey = ''; + $accessSecret = ''; + $bucket = ''; + $region = ''; - switch ($device) { - case Storage::DEVICE_S3: - return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case STORAGE::DEVICE_DO_SPACES: - return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_BACKBLAZE: - return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_LINODE: - return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_WASABI: - return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl); - case Storage::DEVICE_LOCAL: - default: - return new Local($root); + try { + $dsn = new DSN($connection); + $device = $dsn->getScheme(); + $accessKey = $dsn->getUser() ?? ''; + $accessSecret = $dsn->getPassword() ?? ''; + $bucket = $dsn->getPath() ?? ''; + $region = $dsn->getParam('region'); + } catch (\Exception $e) { + Console::warning($e->getMessage() . 'Invalid DSN. Defaulting to Local device.'); + } + + switch ($device) { + case Storage::DEVICE_S3: + return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case STORAGE::DEVICE_DO_SPACES: + return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_BACKBLAZE: + return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_LINODE: + return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_WASABI: + return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl); + case Storage::DEVICE_LOCAL: + default: + return new Local($root); + } + } else { + switch (strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL) ?? '')) { + case Storage::DEVICE_LOCAL: + default: + return new Local($root); + case Storage::DEVICE_S3: + $s3AccessKey = App::getEnv('_APP_STORAGE_S3_ACCESS_KEY', ''); + $s3SecretKey = App::getEnv('_APP_STORAGE_S3_SECRET', ''); + $s3Region = App::getEnv('_APP_STORAGE_S3_REGION', ''); + $s3Bucket = App::getEnv('_APP_STORAGE_S3_BUCKET', ''); + $s3Acl = 'private'; + return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl); + case Storage::DEVICE_DO_SPACES: + $doSpacesAccessKey = App::getEnv('_APP_STORAGE_DO_SPACES_ACCESS_KEY', ''); + $doSpacesSecretKey = App::getEnv('_APP_STORAGE_DO_SPACES_SECRET', ''); + $doSpacesRegion = App::getEnv('_APP_STORAGE_DO_SPACES_REGION', ''); + $doSpacesBucket = App::getEnv('_APP_STORAGE_DO_SPACES_BUCKET', ''); + $doSpacesAcl = 'private'; + return new DOSpaces($root, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl); + case Storage::DEVICE_BACKBLAZE: + $backblazeAccessKey = App::getEnv('_APP_STORAGE_BACKBLAZE_ACCESS_KEY', ''); + $backblazeSecretKey = App::getEnv('_APP_STORAGE_BACKBLAZE_SECRET', ''); + $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); + $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); + $backblazeAcl = 'private'; + return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + case Storage::DEVICE_LINODE: + $linodeAccessKey = App::getEnv('_APP_STORAGE_LINODE_ACCESS_KEY', ''); + $linodeSecretKey = App::getEnv('_APP_STORAGE_LINODE_SECRET', ''); + $linodeRegion = App::getEnv('_APP_STORAGE_LINODE_REGION', ''); + $linodeBucket = App::getEnv('_APP_STORAGE_LINODE_BUCKET', ''); + $linodeAcl = 'private'; + return new Linode($root, $linodeAccessKey, $linodeSecretKey, $linodeBucket, $linodeRegion, $linodeAcl); + case Storage::DEVICE_WASABI: + $wasabiAccessKey = App::getEnv('_APP_STORAGE_WASABI_ACCESS_KEY', ''); + $wasabiSecretKey = App::getEnv('_APP_STORAGE_WASABI_SECRET', ''); + $wasabiRegion = App::getEnv('_APP_STORAGE_WASABI_REGION', ''); + $wasabiBucket = App::getEnv('_APP_STORAGE_WASABI_BUCKET', ''); + $wasabiAcl = 'private'; + return new Wasabi($root, $wasabiAccessKey, $wasabiSecretKey, $wasabiBucket, $wasabiRegion, $wasabiAcl); + } } } } diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 94cb0bb90d..863966eedd 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -347,10 +347,13 @@ class OpenAPI3 extends Format case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': + case 'Appwrite\Utopia\Database\Validator\Queries\Installations': + case 'Appwrite\Utopia\Database\Validator\Queries\Documents': case 'Utopia\Database\Validator\Queries\Documents': case 'Appwrite\Utopia\Database\Validator\Queries\Executions': case 'Appwrite\Utopia\Database\Validator\Queries\Files': case 'Appwrite\Utopia\Database\Validator\Queries\Functions': + case 'Appwrite\Utopia\Database\Validator\Queries\Rules': case 'Appwrite\Utopia\Database\Validator\Queries\Memberships': case 'Appwrite\Utopia\Database\Validator\Queries\Projects': case 'Appwrite\Utopia\Database\Validator\Queries\Teams': diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 6b3d394aad..c6ae7a7ff1 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -347,10 +347,13 @@ class Swagger2 extends Format case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': + case 'Appwrite\Utopia\Database\Validator\Queries\Installations': + case 'Appwrite\Utopia\Database\Validator\Queries\Documents': case 'Utopia\Database\Validator\Queries\Documents': case 'Appwrite\Utopia\Database\Validator\Queries\Executions': case 'Appwrite\Utopia\Database\Validator\Queries\Files': case 'Appwrite\Utopia\Database\Validator\Queries\Functions': + case 'Appwrite\Utopia\Database\Validator\Queries\Rules': case 'Appwrite\Utopia\Database\Validator\Queries\Memberships': case 'Appwrite\Utopia\Database\Validator\Queries\Projects': case 'Appwrite\Utopia\Database\Validator\Queries\Teams': diff --git a/src/Appwrite/Usage/Calculator.php b/src/Appwrite/Usage/Calculator.php new file mode 100644 index 0000000000..37c130a34a --- /dev/null +++ b/src/Appwrite/Usage/Calculator.php @@ -0,0 +1,15 @@ +region = $region; + } + + abstract public function collect(): void; +} diff --git a/src/Appwrite/Usage/Calculators/TimeSeries.php b/src/Appwrite/Usage/Calculators/TimeSeries.php new file mode 100644 index 0000000000..e0a12b443f --- /dev/null +++ b/src/Appwrite/Usage/Calculators/TimeSeries.php @@ -0,0 +1,557 @@ + '1h', + 'startTime' => '-24 hours' + ], + [ + 'key' => '1d', + 'startTime' => '-30 days' + ] + ]; + + /** + * All the metrics that we are collecting + * + * @var array + */ + protected array $metrics = [ + 'project.$all.network.requests' => [ + 'table' => 'appwrite_usage_project_{scope}_network_requests', + ], + 'project.$all.network.bandwidth' => [ + 'table' => 'appwrite_usage_project_{scope}_network_bandwidth', + ], + 'project.$all.network.inbound' => [ + 'table' => 'appwrite_usage_project_{scope}_network_inbound', + ], + 'project.$all.network.outbound' => [ + 'table' => 'appwrite_usage_project_{scope}_network_outbound', + ], + /* Users service metrics */ + 'users.$all.requests.create' => [ + 'table' => 'appwrite_usage_users_{scope}_requests_create', + ], + 'users.$all.requests.read' => [ + 'table' => 'appwrite_usage_users_{scope}_requests_read', + ], + 'users.$all.requests.update' => [ + 'table' => 'appwrite_usage_users_{scope}_requests_update', + ], + 'users.$all.requests.delete' => [ + 'table' => 'appwrite_usage_users_{scope}_requests_delete', + ], + + 'databases.$all.requests.create' => [ + 'table' => 'appwrite_usage_databases_{scope}_requests_create', + ], + 'databases.$all.requests.read' => [ + 'table' => 'appwrite_usage_databases_{scope}_requests_read', + ], + 'databases.$all.requests.update' => [ + 'table' => 'appwrite_usage_databases_{scope}_requests_update', + ], + 'databases.$all.requests.delete' => [ + 'table' => 'appwrite_usage_databases_{scope}_requests_delete', + ], + + 'collections.$all.requests.create' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_create', + ], + 'collections.$all.requests.read' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_read', + ], + 'collections.$all.requests.update' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_update', + ], + 'collections.$all.requests.delete' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_delete', + ], + + 'documents.$all.requests.create' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_create', + ], + 'documents.$all.requests.read' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_read', + ], + 'documents.$all.requests.update' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_update', + ], + 'documents.$all.requests.delete' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_delete', + ], + + 'collections.databaseId.requests.create' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_create', + 'groupBy' => ['databaseId'], + ], + 'collections.databaseId.requests.read' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_read', + 'groupBy' => ['databaseId'], + ], + 'collections.databaseId.requests.update' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_update', + 'groupBy' => ['databaseId'], + ], + 'collections.databaseId.requests.delete' => [ + 'table' => 'appwrite_usage_collections_{scope}_requests_delete', + 'groupBy' => ['databaseId'], + ], + + 'documents.databaseId.requests.create' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_create', + 'groupBy' => ['databaseId'], + ], + 'documents.databaseId.requests.read' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_read', + 'groupBy' => ['databaseId'], + ], + 'documents.databaseId.requests.update' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_update', + 'groupBy' => ['databaseId'], + ], + 'documents.databaseId.requests.delete' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_delete', + 'groupBy' => ['databaseId'], + ], + + 'documents.databaseId/collectionId.requests.create' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_create', + 'groupBy' => ['databaseId', 'collectionId'], + ], + 'documents.databaseId/collectionId.requests.read' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_read', + 'groupBy' => ['databaseId', 'collectionId'], + ], + 'documents.databaseId/collectionId.requests.update' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_update', + 'groupBy' => ['databaseId', 'collectionId'], + ], + 'documents.databaseId/collectionId.requests.delete' => [ + 'table' => 'appwrite_usage_documents_{scope}_requests_delete', + 'groupBy' => ['databaseId', 'collectionId'], + ], + + 'buckets.$all.requests.create' => [ + 'table' => 'appwrite_usage_buckets_{scope}_requests_create', + ], + 'buckets.$all.requests.read' => [ + 'table' => 'appwrite_usage_buckets_{scope}_requests_read', + ], + 'buckets.$all.requests.update' => [ + 'table' => 'appwrite_usage_buckets_{scope}_requests_update', + ], + 'buckets.$all.requests.delete' => [ + 'table' => 'appwrite_usage_buckets_{scope}_requests_delete', + ], + + 'files.$all.requests.create' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_create', + ], + 'files.$all.requests.read' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_read', + ], + 'files.$all.requests.update' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_update', + ], + 'files.$all.requests.delete' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_delete', + ], + + 'files.bucketId.requests.create' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_create', + 'groupBy' => ['bucketId'], + ], + 'files.bucketId.requests.read' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_read', + 'groupBy' => ['bucketId'], + ], + 'files.bucketId.requests.update' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_update', + 'groupBy' => ['bucketId'], + ], + 'files.bucketId.requests.delete' => [ + 'table' => 'appwrite_usage_files_{scope}_requests_delete', + 'groupBy' => ['bucketId'], + ], + + 'sessions.$all.requests.create' => [ + 'table' => 'appwrite_usage_sessions__{scope}_requests_create', + ], + 'sessions.provider.requests.create' => [ + 'table' => 'appwrite_usage_sessions_{scope}_requests_create', + 'groupBy' => ['provider'], + ], + 'sessions.$all.requests.delete' => [ + 'table' => 'appwrite_usage_sessions_{scope}_requests_delete', + ], + 'executions.$all.compute.total' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute', + ], + 'builds.$all.compute.total' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute', + ], + 'executions.$all.compute.failure' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute', + 'filters' => [ + 'functionStatus' => 'failed', + ], + ], + 'builds.$all.compute.failure' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute', + 'filters' => [ + 'functionStatus' => 'failed', + ], + ], + 'executions.$all.compute.success' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute', + 'filters' => [ + 'functionStatus' => 'success', + ], + ], + 'builds.$all.compute.success' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute', + 'filters' => [ + 'functionStatus' => 'success', + ], + ], + 'executions.functionId.compute.total' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute', + 'groupBy' => ['functionId'], + ], + 'builds.functionId.compute.total' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute', + 'groupBy' => ['functionId'], + ], + + 'executions.functionId.compute.failure' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute', + 'groupBy' => ['functionId'], + 'filters' => [ + 'functionStatus' => 'failed', + ], + ], + 'builds.functionId.compute.failure' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute', + 'groupBy' => ['functionId'], + 'filters' => [ + 'functionBuildStatus' => 'failed', + ], + ], + 'executions.functionId.compute.success' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute', + 'groupBy' => ['functionId'], + 'filters' => [ + 'functionStatus' => 'success', + ], + ], + 'builds.functionId.compute.success' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute', + 'groupBy' => ['functionId'], + 'filters' => [ + 'functionBuildStatus' => 'success', + ], + ], + + // counters + 'users.$all.count.total' => [ + 'table' => 'appwrite_usage_users_{scope}_count_total', + ], + 'buckets.$all.count.total' => [ + 'table' => 'appwrite_usage_buckets_{scope}_count_total', + ], + 'files.$all.count.total' => [ + 'table' => 'appwrite_usage_files_{scope}_count_total', + ], + 'files.bucketId.count.total' => [ + 'table' => 'appwrite_usage_files_{scope}_count_total', + 'groupBy' => ['bucketId'] + ], + 'databases.$all.count.total' => [ + 'table' => 'appwrite_usage_databases_{scope}_count_total', + ], + 'collections.$all.count.total' => [ + 'table' => 'appwrite_usage_collections_{scope}_count_total', + ], + 'documents.$all.count.total' => [ + 'table' => 'appwrite_usage_documents_{scope}_count_total', + ], + 'collections.databaseId.count.total' => [ + 'table' => 'appwrite_usage_collections_{scope}_count_total', + 'groupBy' => ['databaseId'] + ], + 'documents.databaseId.count.total' => [ + 'table' => 'appwrite_usage_documents_{scope}_count_total', + 'groupBy' => ['databaseId'] + ], + 'documents.databaseId/collectionId.count.total' => [ + 'table' => 'appwrite_usage_documents_{scope}_count_total', + 'groupBy' => ['databaseId', 'collectionId'] + ], + 'deployments.$all.storage.size' => [ + 'table' => 'appwrite_usage_deployments_{scope}_storage_size', + ], + 'project.$all.storage.size' => [ + 'table' => 'appwrite_usage_project_{scope}_storage_size', + ], + 'files.$all.storage.size' => [ + 'table' => 'appwrite_usage_files_{scope}_storage_size', + ], + 'files.$bucketId.storage.size' => [ + 'table' => 'appwrite_usage_files_{scope}_storage_size', + 'groupBy' => ['bucketId'] + ], + + 'builds.$all.compute.time' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute_time', + ], + 'executions.$all.compute.time' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute_time', + ], + + 'executions.functionId.compute.time' => [ + 'table' => 'appwrite_usage_executions_{scope}_compute_time', + 'groupBy' => ['functionId'], + ], + 'builds.functionId.compute.time' => [ + 'table' => 'appwrite_usage_builds_{scope}_compute_time', + 'groupBy' => ['functionId'], + ], + + 'project.$all.compute.time' => [ // Built time + execution time + 'table' => 'appwrite_usage_project_{scope}_compute_time', + 'groupBy' => ['functionId'], + ], + + 'deployments.$all.storage.size' => [ + 'table' => 'appwrite_usage_deployments_{scope}_storage_size' + ], + 'project.$all.storage.size' => [ + 'table' => 'appwrite_usage_project_{scope}_storage_size' + ], + 'files.$all.storage.size' => [ + 'table' => 'appwrite_usage_files_{scope}_storage_size' + ], + 'files.bucketId.storage.size' => [ + 'table' => 'appwrite_usage_files_{scope}_storage_size', + 'groupBy' => ['bucketId'] + ] + ]; + + public function __construct(string $region, Database $database, InfluxDatabase $influxDB, callable $getProjectDB, Registry $register, callable $errorHandler = null) + { + parent::__construct($region); + $this->database = $database; + $this->influxDB = $influxDB; + $this->getProjectDB = $getProjectDB; + $this->register = $register; + $this->errorHandler = $errorHandler; + } + + /** + * Create or Update Mertic + * Create or update each metric in the stats collection for the given project + * + * @param string $projectId + * @param int $time + * @param string $period + * @param string $metric + * @param int $value + * @param int $type + * + * @return void + */ + private function createOrUpdateMetric(string $projectId, string $time, string $period, string $metric, int $value, int $type): void + { + $id = \md5("{$time}_{$period}_{$metric}"); + $project = $this->database->getDocument('projects', $projectId); + $database = call_user_func($this->getProjectDB, $project); + + try { + $document = $database->getDocument('stats', $id); + if ($document->isEmpty()) { + $database->createDocument('stats', new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $metric, + 'value' => $value, + 'type' => $type, + 'region' => $this->region, + ])); + } else { + $database->updateDocument( + 'stats', + $document->getId(), + $document->setAttribute('value', $value) + ); + } + } catch (\Exception $e) { // if projects are deleted this might fail + if (is_callable($this->errorHandler)) { + call_user_func($this->errorHandler, $e, "sync_project_{$projectId}_metric_{$metric}"); + } else { + throw $e; + } + } + + $this->register->get('pools')->reclaim(); + } + + /** + * Sync From InfluxDB + * Sync stats from influxDB to stats collection in the Appwrite database + * + * @param string $metric + * @param array $options + * @param array $period + * + * @return void + */ + private function syncFromInfluxDB(string $metric, array $options, array $period): void + { + $start = DateTime::createFromFormat('U', \strtotime($period['startTime']))->format(DateTime::RFC3339); + if (!empty($this->latestTime[$metric][$period['key']])) { + $start = $this->latestTime[$metric][$period['key']]; + } + $end = (new DateTime())->format(DateTime::RFC3339); + + $table = $options['table']; //Which influxdb table to query for this metric + $groupBy = empty($options['groupBy']) ? '' : ', ' . implode(', ', array_map(fn($groupBy) => '"' . $groupBy . '" ', $options['groupBy'])); //Some sub level metrics may be grouped by other tags like collectionId, bucketId, etc + + $filters = $options['filters'] ?? []; // Some metrics might have additional filters, like function's status + if (!empty($filters)) { + $filters = ' AND ' . implode(' AND ', array_map(fn ($filter, $value) => "\"{$filter}\"='{$value}'", array_keys($filters), array_values($filters))); + } else { + $filters = ''; + } + + $query = "SELECT sum(value) AS \"value\" "; + $query .= "FROM \"{$table}\" "; + $query .= "WHERE \"time\" > '{$start}' "; + $query .= "AND \"time\" < '{$end}' "; + $query .= "AND \"metric_type\"='counter' {$filters} "; + $query .= "GROUP BY time({$period['key']}), \"projectId\" {$groupBy} "; + $query .= "FILL(null)"; + + try { + $result = $this->influxDB->query($query); + $points = $result->getPoints(); + foreach ($points as $point) { + $projectId = $point['projectId']; + + if (!empty($projectId) && $projectId !== 'console') { + $metricUpdated = $metric; + if (!empty($groupBy)) { + foreach ($options['groupBy'] as $groupBy) { + $groupedBy = $point[$groupBy] ?? ''; + if (empty($groupedBy)) { + continue; + } + $metricUpdated = str_replace($groupBy, $groupedBy, $metricUpdated); + } + } + + $value = (!empty($point['value'])) ? $point['value'] : 0; + + $this->createOrUpdateMetric( + $point['projectId'], + $point['time'], + $period['key'], + $metricUpdated, + $value, + 0 + ); + $this->latestTime[$metric][$period['key']] = $point['time']; + } + } + } catch (\Exception $e) { // if projects are deleted this might fail + if (is_callable($this->errorHandler)) { + call_user_func($this->errorHandler, $e, "sync_metric_{$metric}_influxdb"); + } else { + throw $e; + } + } + } + + /** + * Collect Stats + * Collect all the stats from Influd DB to Database + * + * @return void + */ + public function collect(): void + { + foreach ($this->periods as $period) { + foreach ($this->metrics as $metric => $options) { //for each metrics + try { + $this->syncFromInfluxDB($metric, $options, $period); + } catch (\Exception $e) { + if (is_callable($this->errorHandler)) { + call_user_func($this->errorHandler, $e); + } else { + throw $e; + } + } + } + } + } +} diff --git a/src/Appwrite/Usage/Stats.php b/src/Appwrite/Usage/Stats.php new file mode 100644 index 0000000000..e6e0056664 --- /dev/null +++ b/src/Appwrite/Usage/Stats.php @@ -0,0 +1,225 @@ +statsd = $statsd; + } + + /** + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function setParam(string $key, $value): self + { + $this->params[$key] = $value; + + return $this; + } + + /** + * @param string $key + * + * @return mixed|null + */ + public function getParam(string $key) + { + return (isset($this->params[$key])) ? $this->params[$key] : null; + } + + /** + * @param string $namespace + * + * @return $this + */ + public function setNamespace(string $namespace): self + { + $this->namespace = $namespace; + + return $this; + } + + /** + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Submit data to StatsD. + * Send various metrics to StatsD based on the parameters that are set + * @return void + */ + public function submit(): void + { + $projectId = $this->params['projectId'] ?? ''; + $projectInternalId = $this->params['projectInternalId']; + $tags = ",projectInternalId={$projectInternalId},projectId={$projectId},version=" . App::getEnv('_APP_VERSION', 'UNKNOWN'); + + // the global namespace is prepended to every key (optional) + $this->statsd->setNamespace($this->namespace); + + $httpRequest = $this->params['project.{scope}.network.requests'] ?? 0; + $httpMethod = $this->params['httpMethod'] ?? ''; + if ($httpRequest >= 1) { + $this->statsd->increment('project.{scope}.network.requests' . $tags . ',method=' . \strtolower($httpMethod)); + } + + $inbound = $this->params['project.{scope}.network.inbound'] ?? 0; + $outbound = $this->params['project.{scope}.network.outbound'] ?? 0; + $this->statsd->count('project.{scope}.network.inbound' . $tags, $inbound); + $this->statsd->count('project.{scope}.network.outbound' . $tags, $outbound); + $this->statsd->count('project.{scope}.network.bandwidth' . $tags, $inbound + $outbound); + + $usersMetrics = [ + 'users.{scope}.requests.create', + 'users.{scope}.requests.read', + 'users.{scope}.requests.update', + 'users.{scope}.requests.delete', + 'users.{scope}.count.total', + ]; + + foreach ($usersMetrics as $metric) { + $value = $this->params[$metric] ?? 0; + if ($value === 1 || $value === -1) { + $this->statsd->count($metric . $tags, $value); + } + } + + $dbMetrics = [ + 'databases.{scope}.requests.create', + 'databases.{scope}.requests.read', + 'databases.{scope}.requests.update', + 'databases.{scope}.requests.delete', + 'collections.{scope}.requests.create', + 'collections.{scope}.requests.read', + 'collections.{scope}.requests.update', + 'collections.{scope}.requests.delete', + 'documents.{scope}.requests.create', + 'documents.{scope}.requests.read', + 'documents.{scope}.requests.update', + 'documents.{scope}.requests.delete', + 'databases.{scope}.count.total', + 'collections.{scope}.count.total', + 'documents.{scope}.count.total' + ]; + + foreach ($dbMetrics as $metric) { + $value = $this->params[$metric] ?? 0; + if ($value === 1 || $value === -1) { + $dbTags = $tags . ",collectionId=" . ($this->params['collectionId'] ?? '') . ",databaseId=" . ($this->params['databaseId'] ?? ''); + $this->statsd->count($metric . $dbTags, $value); + } + } + + $storageMertics = [ + 'buckets.{scope}.requests.create', + 'buckets.{scope}.requests.read', + 'buckets.{scope}.requests.update', + 'buckets.{scope}.requests.delete', + 'files.{scope}.requests.create', + 'files.{scope}.requests.read', + 'files.{scope}.requests.update', + 'files.{scope}.requests.delete', + 'buckets.{scope}.count.total', + 'files.{scope}.count.total', + 'files.{scope}.storage.size' + ]; + + foreach ($storageMertics as $metric) { + $value = $this->params[$metric] ?? 0; + if ($value !== 0) { + $storageTags = $tags . ",bucketId=" . ($this->params['bucketId'] ?? ''); + $this->statsd->count($metric . $storageTags, $value); + } + } + + $sessionsMetrics = [ + 'sessions.{scope}.requests.create', + 'sessions.{scope}.requests.update', + 'sessions.{scope}.requests.delete', + ]; + + foreach ($sessionsMetrics as $metric) { + $value = $this->params[$metric] ?? 0; + if ($value >= 1) { + $sessionTags = $tags . ",provider=" . ($this->params['provider'] ?? ''); + $this->statsd->count($metric . $sessionTags, $value); + } + } + + $functionId = $this->params['functionId'] ?? ''; + $functionExecution = $this->params['executions.{scope}.compute'] ?? 0; + $functionExecutionTime = ($this->params['executionTime'] ?? 0) * 1000; // ms + $functionExecutionStatus = $this->params['executionStatus'] ?? ''; + + $functionBuild = $this->params['builds.{scope}.compute'] ?? 0; + $functionBuildTime = ($this->params['buildTime'] ?? 0) * 1000; // ms + $functionBuildStatus = $this->params['buildStatus'] ?? ''; + $functionCompute = $functionExecutionTime + $functionBuildTime; + $functionTags = $tags . ',functionId=' . $functionId; + + $deploymentSize = $this->params['deployment.{scope}.storage.size'] ?? 0; + $storageSize = $this->params['files.{scope}.storage.size'] ?? 0; + if ($deploymentSize + $storageSize > 0 || $deploymentSize + $storageSize <= -1) { + $this->statsd->count('project.{scope}.storage.size' . $tags, $deploymentSize + $storageSize); + } + + if ($deploymentSize !== 0) { + $this->statsd->count('deployments.{scope}.storage.size' . $functionTags, $deploymentSize); + } + + if ($functionExecution >= 1) { + $this->statsd->increment('executions.{scope}.compute' . $functionTags . ',functionStatus=' . $functionExecutionStatus); + if ($functionExecutionTime > 0) { + $this->statsd->count('executions.{scope}.compute.time' . $functionTags, $functionExecutionTime); + } + } + if ($functionBuild >= 1) { + $this->statsd->increment('builds.{scope}.compute' . $functionTags . ',functionBuildStatus=' . $functionBuildStatus); + $this->statsd->count('builds.{scope}.compute.time' . $functionTags, $functionBuildTime); + } + if ($functionBuild + $functionExecution >= 1) { + $this->statsd->count('project.{scope}.compute.time' . $functionTags, $functionCompute); + } + + $this->reset(); + } + + public function reset(): self + { + $this->params = []; + $this->namespace = 'appwrite.usage'; + + return $this; + } +} diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php b/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php index 05b3326af1..427779efa5 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php @@ -5,10 +5,11 @@ namespace Appwrite\Utopia\Database\Validator\Queries; class Deployments extends Base { public const ALLOWED_ATTRIBUTES = [ - 'entrypoint', 'size', 'buildId', 'activate', + 'entrypoint', + 'commands' ]; /** diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php b/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php index 2bfe46e28d..ecceab7fae 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php @@ -7,7 +7,7 @@ class Executions extends Base public const ALLOWED_ATTRIBUTES = [ 'trigger', 'status', - 'statusCode', + 'responseStatusCode', 'duration' ]; diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Functions.php b/src/Appwrite/Utopia/Database/Validator/Queries/Functions.php index a2ba368953..89f5d52c81 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Functions.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Functions.php @@ -12,7 +12,10 @@ class Functions extends Base 'schedule', 'scheduleNext', 'schedulePrevious', - 'timeout' + 'timeout', + 'entrypoint', + 'commands', + 'installationId' ]; /** diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Identities.php b/src/Appwrite/Utopia/Database/Validator/Queries/Identities.php new file mode 100644 index 0000000000..cb0462ee13 --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Identities.php @@ -0,0 +1,23 @@ +getCommands($content['runtime'] ?? ''); + break; + case 'functions.update': + $content['commands'] = $this->getCommands($content['runtime'] ?? ''); + break; + case 'functions.createExecution': + $content['body'] = $content['data']; + unset($content['data']); + break; + } + + return $content; + } + + private function getCommands(string $runtime): string + { + if (\str_starts_with($runtime, 'node')) { + return 'npm install'; + } elseif (\str_starts_with($runtime, 'python')) { + return 'pip install --no-cache-dir -r requirements.txt'; + } elseif (\str_starts_with($runtime, 'dart')) { + return 'dart pub get'; + } elseif (\str_starts_with($runtime, 'php')) { + return 'composer update --no-interaction --ignore-platform-reqs --optimize-autoloader --prefer-dist --no-dev'; + } elseif (\str_starts_with($runtime, 'ruby')) { + return 'bundle install'; + } elseif (\str_starts_with($runtime, 'swift')) { + return 'swift package resolve'; + } elseif (\str_starts_with($runtime, 'dotnet')) { + return 'dotnet restore'; + } + + return ''; + } +} diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 63e9170008..7e52536eed 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -32,6 +32,7 @@ use Appwrite\Utopia\Response\Model\AttributeURL; use Appwrite\Utopia\Response\Model\AttributeDatetime; use Appwrite\Utopia\Response\Model\AttributeRelationship; use Appwrite\Utopia\Response\Model\BaseList; +use Appwrite\Utopia\Response\Model\Branch; use Appwrite\Utopia\Response\Model\Collection; use Appwrite\Utopia\Response\Model\Database; use Appwrite\Utopia\Response\Model\Continent; @@ -47,6 +48,7 @@ use Appwrite\Utopia\Response\Model\File; use Appwrite\Utopia\Response\Model\Bucket; use Appwrite\Utopia\Response\Model\ConsoleVariables; use Appwrite\Utopia\Response\Model\Func; +use Appwrite\Utopia\Response\Model\Identity; use Appwrite\Utopia\Response\Model\Index; use Appwrite\Utopia\Response\Model\JWT; use Appwrite\Utopia\Response\Model\Key; @@ -64,6 +66,8 @@ use Appwrite\Utopia\Response\Model\Platform; use Appwrite\Utopia\Response\Model\Project; use Appwrite\Utopia\Response\Model\Rule; use Appwrite\Utopia\Response\Model\Deployment; +use Appwrite\Utopia\Response\Model\Detection; +use Appwrite\Utopia\Response\Model\Headers; use Appwrite\Utopia\Response\Model\TemplateEmail; use Appwrite\Utopia\Response\Model\Token; use Appwrite\Utopia\Response\Model\Webhook; @@ -73,9 +77,10 @@ use Appwrite\Utopia\Response\Model\HealthQueue; use Appwrite\Utopia\Response\Model\HealthStatus; use Appwrite\Utopia\Response\Model\HealthTime; use Appwrite\Utopia\Response\Model\HealthVersion; +use Appwrite\Utopia\Response\Model\Installation; use Appwrite\Utopia\Response\Model\LocaleCode; -use Appwrite\Utopia\Response\Model\Mock; // Keep last use Appwrite\Utopia\Response\Model\Provider; +use Appwrite\Utopia\Response\Model\ProviderRepository; use Appwrite\Utopia\Response\Model\Runtime; use Appwrite\Utopia\Response\Model\TemplateSMS; use Appwrite\Utopia\Response\Model\UsageBuckets; @@ -88,6 +93,11 @@ use Appwrite\Utopia\Response\Model\UsageProject; use Appwrite\Utopia\Response\Model\UsageStorage; use Appwrite\Utopia\Response\Model\UsageUsers; use Appwrite\Utopia\Response\Model\Variable; +use Appwrite\Utopia\Response\Model\Migration; +use Appwrite\Utopia\Response\Model\MigrationFirebaseProject; +use Appwrite\Utopia\Response\Model\MigrationReport; +// Keep last +use Appwrite\Utopia\Response\Model\Mock; /** * @method int getStatusCode() @@ -145,6 +155,8 @@ class Response extends SwooleResponse public const MODEL_USER_LIST = 'userList'; public const MODEL_SESSION = 'session'; public const MODEL_SESSION_LIST = 'sessionList'; + public const MODEL_IDENTITY = 'identity'; + public const MODEL_IDENTITY_LIST = 'identityList'; public const MODEL_TOKEN = 'token'; public const MODEL_JWT = 'jwt'; public const MODEL_PREFERENCES = 'preferences'; @@ -185,6 +197,15 @@ class Response extends SwooleResponse public const MODEL_MEMBERSHIP = 'membership'; public const MODEL_MEMBERSHIP_LIST = 'membershipList'; + // VCS + public const MODEL_INSTALLATION = 'installation'; + public const MODEL_INSTALLATION_LIST = 'installationList'; + public const MODEL_PROVIDER_REPOSITORY = 'providerRepository'; + public const MODEL_PROVIDER_REPOSITORY_LIST = 'providerRepositoryList'; + public const MODEL_BRANCH = 'branch'; + public const MODEL_BRANCH_LIST = 'branchList'; + public const MODEL_DETECTION = 'detection'; + // Functions public const MODEL_FUNCTION = 'function'; public const MODEL_FUNCTION_LIST = 'functionList'; @@ -197,6 +218,18 @@ class Response extends SwooleResponse public const MODEL_BUILD = 'build'; public const MODEL_BUILD_LIST = 'buildList'; // Not used anywhere yet public const MODEL_FUNC_PERMISSIONS = 'funcPermissions'; + public const MODEL_HEADERS = 'headers'; + + // Proxy + public const MODEL_PROXY_RULE = 'proxyRule'; + public const MODEL_PROXY_RULE_LIST = 'proxyRuleList'; + + // Migrations + public const MODEL_MIGRATION = 'migration'; + public const MODEL_MIGRATION_LIST = 'migrationList'; + public const MODEL_MIGRATION_REPORT = 'migrationReport'; + public const MODEL_MIGRATION_FIREBASE_PROJECT = 'firebaseProject'; + public const MODEL_MIGRATION_FIREBASE_PROJECT_LIST = 'firebaseProjectList'; // Project public const MODEL_PROJECT = 'project'; @@ -209,10 +242,9 @@ class Response extends SwooleResponse public const MODEL_PROVIDER_LIST = 'providerList'; public const MODEL_PLATFORM = 'platform'; public const MODEL_PLATFORM_LIST = 'platformList'; - public const MODEL_DOMAIN = 'domain'; - public const MODEL_DOMAIN_LIST = 'domainList'; public const MODEL_VARIABLE = 'variable'; public const MODEL_VARIABLE_LIST = 'variableList'; + public const MODEL_VCS = 'vcs'; public const MODEL_SMS_TEMPLATE = 'smsTemplate'; public const MODEL_EMAIL_TEMPLATE = 'emailTemplate'; @@ -231,6 +263,8 @@ class Response extends SwooleResponse public const MODEL_PERMISSIONS = 'permissions'; public const MODEL_RULE = 'rule'; public const MODEL_TASK = 'task'; + public const MODEL_DOMAIN = 'domain'; + public const MODEL_DOMAIN_LIST = 'domainList'; // Tests (keep last) public const MODEL_MOCK = 'mock'; @@ -265,12 +299,16 @@ class Response extends SwooleResponse ->setModel(new BaseList('Indexes List', self::MODEL_INDEX_LIST, 'indexes', self::MODEL_INDEX)) ->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER)) ->setModel(new BaseList('Sessions List', self::MODEL_SESSION_LIST, 'sessions', self::MODEL_SESSION)) + ->setModel(new BaseList('Identities List', self::MODEL_IDENTITY_LIST, 'identities', self::MODEL_IDENTITY)) ->setModel(new BaseList('Logs List', self::MODEL_LOG_LIST, 'logs', self::MODEL_LOG)) ->setModel(new BaseList('Files List', self::MODEL_FILE_LIST, 'files', self::MODEL_FILE)) ->setModel(new BaseList('Buckets List', self::MODEL_BUCKET_LIST, 'buckets', self::MODEL_BUCKET)) ->setModel(new BaseList('Teams List', self::MODEL_TEAM_LIST, 'teams', self::MODEL_TEAM)) ->setModel(new BaseList('Memberships List', self::MODEL_MEMBERSHIP_LIST, 'memberships', self::MODEL_MEMBERSHIP)) ->setModel(new BaseList('Functions List', self::MODEL_FUNCTION_LIST, 'functions', self::MODEL_FUNCTION)) + ->setModel(new BaseList('Installations List', self::MODEL_INSTALLATION_LIST, 'installations', self::MODEL_INSTALLATION)) + ->setModel(new BaseList('Provider Repositories List', self::MODEL_PROVIDER_REPOSITORY_LIST, 'providerRepositories', self::MODEL_PROVIDER_REPOSITORY)) + ->setModel(new BaseList('Branches List', self::MODEL_BRANCH_LIST, 'branches', self::MODEL_BRANCH)) ->setModel(new BaseList('Runtimes List', self::MODEL_RUNTIME_LIST, 'runtimes', self::MODEL_RUNTIME)) ->setModel(new BaseList('Deployments List', self::MODEL_DEPLOYMENT_LIST, 'deployments', self::MODEL_DEPLOYMENT)) ->setModel(new BaseList('Executions List', self::MODEL_EXECUTION_LIST, 'executions', self::MODEL_EXECUTION)) @@ -280,7 +318,6 @@ class Response extends SwooleResponse ->setModel(new BaseList('API Keys List', self::MODEL_KEY_LIST, 'keys', self::MODEL_KEY, true, false)) ->setModel(new BaseList('Providers List', self::MODEL_PROVIDER_LIST, 'platforms', self::MODEL_PROVIDER, true, false)) ->setModel(new BaseList('Platforms List', self::MODEL_PLATFORM_LIST, 'platforms', self::MODEL_PLATFORM, true, false)) - ->setModel(new BaseList('Domains List', self::MODEL_DOMAIN_LIST, 'domains', self::MODEL_DOMAIN, true, false)) ->setModel(new BaseList('Countries List', self::MODEL_COUNTRY_LIST, 'countries', self::MODEL_COUNTRY)) ->setModel(new BaseList('Continents List', self::MODEL_CONTINENT_LIST, 'continents', self::MODEL_CONTINENT)) ->setModel(new BaseList('Languages List', self::MODEL_LANGUAGE_LIST, 'languages', self::MODEL_LANGUAGE)) @@ -289,7 +326,10 @@ class Response extends SwooleResponse ->setModel(new BaseList('Metric List', self::MODEL_METRIC_LIST, 'metrics', self::MODEL_METRIC, true, false)) ->setModel(new BaseList('Variables List', self::MODEL_VARIABLE_LIST, 'variables', self::MODEL_VARIABLE)) ->setModel(new BaseList('Status List', self::MODEL_HEALTH_STATUS_LIST, 'statuses', self::MODEL_HEALTH_STATUS)) + ->setModel(new BaseList('Rule List', self::MODEL_PROXY_RULE_LIST, 'rules', self::MODEL_PROXY_RULE)) ->setModel(new BaseList('Locale codes list', self::MODEL_LOCALE_CODE_LIST, 'localeCodes', self::MODEL_LOCALE_CODE)) + ->setModel(new BaseList('Migrations List', self::MODEL_MIGRATION_LIST, 'migrations', self::MODEL_MIGRATION)) + ->setModel(new BaseList('Migrations Firebase Projects List', self::MODEL_MIGRATION_FIREBASE_PROJECT_LIST, 'projects', self::MODEL_MIGRATION_FIREBASE_PROJECT)) // Entities ->setModel(new Database()) ->setModel(new Collection()) @@ -319,6 +359,7 @@ class Response extends SwooleResponse ->setModel(new Account()) ->setModel(new Preferences()) ->setModel(new Session()) + ->setModel(new Identity()) ->setModel(new Token()) ->setModel(new JWT()) ->setModel(new Locale()) @@ -328,6 +369,10 @@ class Response extends SwooleResponse ->setModel(new Team()) ->setModel(new Membership()) ->setModel(new Func()) + ->setModel(new Installation()) + ->setModel(new ProviderRepository()) + ->setModel(new Detection()) + ->setModel(new Branch()) ->setModel(new Runtime()) ->setModel(new Deployment()) ->setModel(new Execution()) @@ -335,7 +380,6 @@ class Response extends SwooleResponse ->setModel(new Project()) ->setModel(new Webhook()) ->setModel(new Key()) - ->setModel(new Domain()) ->setModel(new Provider()) ->setModel(new Platform()) ->setModel(new Variable()) @@ -359,9 +403,14 @@ class Response extends SwooleResponse ->setModel(new UsageFunctions()) ->setModel(new UsageFunction()) ->setModel(new UsageProject()) + ->setModel(new Headers()) + ->setModel(new Rule()) ->setModel(new TemplateSMS()) ->setModel(new TemplateEmail()) ->setModel(new ConsoleVariables()) + ->setModel(new Migration()) + ->setModel(new MigrationReport()) + ->setModel(new MigrationFirebaseProject()) // Verification // Recovery // Tests (keep last) @@ -431,7 +480,7 @@ class Response extends SwooleResponse */ public function dynamic(Document $document, string $model): void { - $output = $this->output(new Document($document->getArrayCopy()), $model); + $output = $this->output(clone $document, $model); // If filter is set, parse the output if (self::hasFilter()) { @@ -472,11 +521,11 @@ class Response extends SwooleResponse */ public function output(Document $document, string $model): array { - $data = new Document($document->getArrayCopy()); + $data = clone $document; $model = $this->getModel($model); $output = []; - $data = $model->filter($document); + $data = $model->filter($data); if ($model->isAny()) { $this->payload = $data->getArrayCopy(); @@ -485,7 +534,7 @@ class Response extends SwooleResponse } foreach ($model->getRules() as $key => $rule) { - if (!$document->isSet($key) && $rule['required']) { // do not set attribute in response if not required + if (!$data->isSet($key) && $rule['required']) { // do not set attribute in response if not required if (\array_key_exists('default', $rule)) { $data->setAttribute($key, $rule['default']); } else { @@ -494,11 +543,11 @@ class Response extends SwooleResponse } if ($rule['array']) { - if (!is_array($document[$key])) { + if (!is_array($data[$key])) { throw new Exception($key . ' must be an array of type ' . $rule['type']); } - foreach ($document[$key] as $index => $item) { + foreach ($data[$key] as $index => $item) { if ($item instanceof Document) { if (\is_array($rule['type'])) { foreach ($rule['type'] as $type) { @@ -526,7 +575,7 @@ class Response extends SwooleResponse } } } else { - if ($document[$key] instanceof Document) { + if ($data[$key] instanceof Document) { $data[$key] = $this->output($data[$key], $rule['type']); } } @@ -620,4 +669,16 @@ class Response extends SwooleResponse { return self::$filter != null; } + + /** + * Set Header + * + * @param string $key + * @param string $value + * @return void + */ + public function setHeader(string $key, string $value): void + { + $this->sendHeader($key, $value); + } } diff --git a/src/Appwrite/Utopia/Response/Filters/V16.php b/src/Appwrite/Utopia/Response/Filters/V16.php new file mode 100644 index 0000000000..6943bd8f4d --- /dev/null +++ b/src/Appwrite/Utopia/Response/Filters/V16.php @@ -0,0 +1,109 @@ +parseDeployment($parsedResponse); + break; + case Response::MODEL_PROXY_RULE: + // We won't be supporting the domain endpoints for older SDKs + // since these APIs are internal. As such, no filtering required + break; + case Response::MODEL_EXECUTION: + $parsedResponse = $this->parseExecution($parsedResponse); + break; + case Response::MODEL_FUNCTION: + $parsedResponse = $this->parseFunction($parsedResponse); + break; + case Response::MODEL_PROJECT: + $parsedResponse = $this->parseProject($parsedResponse); + break; + case Response::MODEL_VARIABLE: + $parsedResponse = $this->parseVariable($parsedResponse); + break; + } + + return $parsedResponse; + } + + protected function parseDeployment(array $content) + { + $content['buildStderr'] = ''; + $content['buildStdout'] = $content['buildLogs']; + unset($content['buildLogs']); + return $content; + } + + protected function parseExecution(array $content) + { + if (isset($content['responseStatusCode'])) { + $content['statusCode'] = $content['responseStatusCode']; + unset($content['responseStatusCode']); + } + + if (isset($content['responseBody'])) { + $content['response'] = $content['responseBody']; + unset($content['responseBody']); + } + + if (isset($content['logs'])) { + $content['stdout'] = $content['logs']; + unset($content['logs']); + } + + if (isset($content['errors'])) { + $content['stderr'] = $content['errors']; + unset($content['errors']); + } + + return $content; + } + + protected function parseFunction(array $content) + { + $content['schedulePrevious'] = ''; + $content['scheduleNext'] = ''; + + if (!empty($content['schedule'])) { + $cron = new CronExpression($content['schedule']); + $content['schedulePrevious'] = DateTime::formatTz(DateTime::format($cron->getPreviousRunDate())); + $content['scheduleNext'] = DateTime::formatTz(DateTime::format($cron->getNextRunDate())); + } + + return $content; + } + + protected function parseProject(array $content) + { + foreach ($content['providers'] ?? [] as $i => $provider) { + $content['providers'][$i]['name'] = \ucfirst($provider['key']); + unset($content['providers'][$i]['key']); + } + + $content['domains'] = []; + return $content; + } + + protected function parseVariable(array $content) + { + if (isset($content['resourceId'])) { + $content['functionId'] = $content['resourceId']; + unset($content['resourceId']); + } + + return $content; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/BaseList.php b/src/Appwrite/Utopia/Response/Model/BaseList.php index 06a5249388..d4ba6b0ab7 100644 --- a/src/Appwrite/Utopia/Response/Model/BaseList.php +++ b/src/Appwrite/Utopia/Response/Model/BaseList.php @@ -34,7 +34,7 @@ class BaseList extends Model $namesWithCap = [ 'documents', 'collections', 'users', 'files', 'buckets', 'functions', 'deployments', 'executions', 'projects', 'webhooks', 'keys', - 'platforms', 'domains', 'memberships', 'teams' + 'platforms', 'rules', 'memberships', 'teams' ]; if (\in_array($name, $namesWithCap)) { diff --git a/src/Appwrite/Utopia/Response/Model/Branch.php b/src/Appwrite/Utopia/Response/Model/Branch.php new file mode 100644 index 0000000000..9264006ecc --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Branch.php @@ -0,0 +1,40 @@ +addRule('name', [ + 'type' => self::TYPE_STRING, + 'description' => 'Branch Name.', + 'default' => '', + 'example' => 'main', + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Branch'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_BRANCH; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Build.php b/src/Appwrite/Utopia/Response/Model/Build.php index b76f0ee083..d80c17645a 100644 --- a/src/Appwrite/Utopia/Response/Model/Build.php +++ b/src/Appwrite/Utopia/Response/Model/Build.php @@ -63,6 +63,12 @@ class Build extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('size', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'The code size in bytes.', + 'default' => 0, + 'example' => 128, + ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Collection.php b/src/Appwrite/Utopia/Response/Model/Collection.php index ae3e283378..e634c88f3a 100644 --- a/src/Appwrite/Utopia/Response/Model/Collection.php +++ b/src/Appwrite/Utopia/Response/Model/Collection.php @@ -49,7 +49,7 @@ class Collection extends Model ]) ->addRule('enabled', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Collection enabled.', + '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.', 'default' => true, 'example' => false, ]) diff --git a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php index e52638f82a..a82b8008cc 100644 --- a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php +++ b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php @@ -33,6 +33,24 @@ class ConsoleVariables extends Model '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\'.', 'default' => '', 'example' => 'enabled', + ]) + ->addRule('_APP_VCS_ENABLED', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Defines if VCS (Version Control System) is enabled.', + 'default' => false, + 'example' => true, + ]) + ->addRule('_APP_DOMAIN_ENABLED', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Defines if main domain is configured. If so, custom domains can be created.', + 'default' => false, + 'example' => true, + ]) + ->addRule('_APP_ASSISTANT_ENABLED', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Defines if AI assistant is enabled.', + 'default' => false, + 'example' => true, ]); } diff --git a/src/Appwrite/Utopia/Response/Model/Database.php b/src/Appwrite/Utopia/Response/Model/Database.php index bd9ae4625c..90b4ac8cb4 100644 --- a/src/Appwrite/Utopia/Response/Model/Database.php +++ b/src/Appwrite/Utopia/Response/Model/Database.php @@ -36,7 +36,7 @@ class Database extends Model ]) ->addRule('enabled', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Database enabled.', + '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.', 'default' => true, 'example' => false, ]) diff --git a/src/Appwrite/Utopia/Response/Model/Deployment.php b/src/Appwrite/Utopia/Response/Model/Deployment.php index 8862d6a14e..46eb52afae 100644 --- a/src/Appwrite/Utopia/Response/Model/Deployment.php +++ b/src/Appwrite/Utopia/Response/Model/Deployment.php @@ -28,6 +28,12 @@ class Deployment extends Model 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Type of deployment.', + 'default' => '', + 'example' => 'vcs', + ]) ->addRule('resourceId', [ 'type' => self::TYPE_STRING, 'description' => 'Resource ID.', @@ -44,7 +50,7 @@ class Deployment extends Model 'type' => self::TYPE_STRING, 'description' => 'The entrypoint file to use to execute the deployment code.', 'default' => '', - 'example' => 'enabled', + 'example' => 'index.js', ]) ->addRule('size', [ 'type' => self::TYPE_INTEGER, @@ -66,21 +72,15 @@ class Deployment extends Model ]) ->addRule('status', [ 'type' => self::TYPE_STRING, - 'description' => 'The deployment status. Possible values are "processing", "building", "pending", "ready", and "failed".', + 'description' => 'The deployment status. Possible values are "processing", "building", "waiting", "ready", and "failed".', 'default' => '', 'example' => 'ready', ]) - ->addRule('buildStdout', [ + ->addRule('buildLogs', [ 'type' => self::TYPE_STRING, - 'description' => 'The build stdout.', + 'description' => 'The build logs.', 'default' => '', - 'example' => 'enabled', - ]) - ->addRule('buildStderr', [ - 'type' => self::TYPE_STRING, - 'description' => 'The build stderr.', - 'default' => '', - 'example' => 'enabled', + 'example' => 'Compiling source files...', ]) ->addRule('buildTime', [ 'type' => self::TYPE_INTEGER, @@ -88,7 +88,72 @@ class Deployment extends Model 'default' => 0, 'example' => 128, ]) - ; + ->addRule('providerRepositoryName', [ + 'type' => self::TYPE_STRING, + 'description' => 'The name of the vcs provider repository', + 'default' => '', + 'example' => 'database', + ]) + ->addRule('providerRepositoryOwner', [ + 'type' => self::TYPE_STRING, + 'description' => 'The name of the vcs provider repository owner', + 'default' => '', + 'example' => 'utopia', + ]) + ->addRule('providerRepositoryUrl', [ + 'type' => self::TYPE_STRING, + 'description' => 'The url of the vcs provider repository', + 'default' => '', + 'example' => 'https://github.com/vermakhushboo/g4-node-function', + ]) + ->addRule('providerBranch', [ + 'type' => self::TYPE_STRING, + 'description' => 'The branch name of the vcs provider repository', + 'default' => '', + 'example' => 'main', + ]) + ->addRule('providerCommitHash', [ + 'type' => self::TYPE_STRING, + 'description' => 'The commit hash of the vcs commit', + 'default' => '', + 'example' => '7c3f25d', + ]) + ->addRule('providerCommitAuthorUrl', [ + 'type' => self::TYPE_STRING, + 'description' => 'The url of vcs commit author', + 'default' => '', + 'example' => 'https://github.com/vermakhushboo', + ]) + ->addRule('providerCommitAuthor', [ + 'type' => self::TYPE_STRING, + 'description' => 'The name of vcs commit author', + 'default' => '', + 'example' => 'Khushboo Verma', + ]) + ->addRule('providerCommitMessage', [ + 'type' => self::TYPE_STRING, + 'description' => 'The commit message', + 'default' => '', + 'example' => 'Update index.js', + ]) + ->addRule('providerCommitUrl', [ + 'type' => self::TYPE_STRING, + 'description' => 'The url of the vcs commit', + 'default' => '', + 'example' => 'https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb', + ]) + ->addRule('providerBranch', [ + 'type' => self::TYPE_STRING, + 'description' => 'The branch of the vcs repository', + 'default' => '', + 'example' => '0.7.x', + ]) + ->addRule('providerBranchUrl', [ + 'type' => self::TYPE_STRING, + 'description' => 'The branch of the vcs repository', + 'default' => '', + 'example' => 'https://github.com/vermakhushboo/appwrite/tree/0.7.x', + ]); } /** diff --git a/src/Appwrite/Utopia/Response/Model/Detection.php b/src/Appwrite/Utopia/Response/Model/Detection.php new file mode 100644 index 0000000000..c71baa0b0c --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Detection.php @@ -0,0 +1,40 @@ +addRule('runtime', [ + 'type' => self::TYPE_STRING, + 'description' => 'Runtime', + 'default' => '', + 'example' => 'node', + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Detection'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_DETECTION; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Domain.php b/src/Appwrite/Utopia/Response/Model/Domain.php deleted file mode 100644 index 135bb52f90..0000000000 --- a/src/Appwrite/Utopia/Response/Model/Domain.php +++ /dev/null @@ -1,88 +0,0 @@ -addRule('$id', [ - 'type' => self::TYPE_STRING, - 'description' => 'Domain ID.', - 'default' => '', - 'example' => '5e5ea5c16897e', - ]) - ->addRule('$createdAt', [ - 'type' => self::TYPE_DATETIME, - 'description' => 'Domain creation date in ISO 8601 format.', - 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, - ]) - ->addRule('$updatedAt', [ - 'type' => self::TYPE_DATETIME, - 'description' => 'Domain update date in ISO 8601 format.', - 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, - ]) - ->addRule('domain', [ - 'type' => self::TYPE_STRING, - 'description' => 'Domain name.', - 'default' => '', - 'example' => 'appwrite.company.com', - ]) - ->addRule('registerable', [ - 'type' => self::TYPE_STRING, - 'description' => 'Registerable domain name.', - 'default' => '', - 'example' => 'company.com', - ]) - ->addRule('tld', [ - 'type' => self::TYPE_STRING, - 'description' => 'TLD name.', - 'default' => '', - 'example' => 'com', - ]) - ->addRule('verification', [ - 'type' => self::TYPE_BOOLEAN, - 'description' => 'Verification process status.', - 'default' => false, - 'example' => true, - ]) - ->addRule('certificateId', [ - 'type' => self::TYPE_STRING, - 'description' => 'Certificate ID.', - 'default' => '', - 'example' => '6ejea5c13377e', - ]) - ; - } - - /** - * Get Name - * - * @return string - */ - public function getName(): string - { - return 'Domain'; - } - - /** - * Get Type - * - * @return string - */ - public function getType(): string - { - return Response::MODEL_DOMAIN; - } -} diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 8672a91598..3ff171dfff 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -54,33 +54,59 @@ class Execution extends Model 'default' => '', 'example' => 'processing', ]) - ->addRule('statusCode', [ + ->addRule('requestMethod', [ + 'type' => self::TYPE_STRING, + 'description' => 'HTTP request method type.', + 'default' => '', + 'example' => 'GET', + ]) + ->addRule('requestPath', [ + 'type' => self::TYPE_STRING, + 'description' => 'HTTP request path and query.', + 'default' => '', + 'example' => '/articles?id=5', + ]) + ->addRule('requestHeaders', [ + 'type' => Response::MODEL_HEADERS, + '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.', + 'default' => [], + 'example' => [['Content-Type' => 'application/json']], + 'array' => true, + ]) + ->addRule('responseStatusCode', [ 'type' => self::TYPE_INTEGER, - 'description' => 'The script status code.', + 'description' => 'HTTP response status code.', 'default' => 0, - 'example' => 0, + 'example' => 200, ]) - ->addRule('response', [ + ->addRule('responseBody', [ 'type' => self::TYPE_STRING, - 'description' => 'The script response output string. Logs the last 4,000 characters of the execution response output.', + 'description' => 'HTTP response body. This will return empty unless execution is created as synchronous.', + 'default' => '', + 'example' => 'Developers are awesome.', + ]) + ->addRule('responseHeaders', [ + 'type' => Response::MODEL_HEADERS, + '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.', + 'default' => [], + 'example' => [['Content-Type' => 'application/json']], + 'array' => true, + ]) + ->addRule('logs', [ + 'type' => self::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.', 'default' => '', 'example' => '', ]) - ->addRule('stdout', [ + ->addRule('errors', [ 'type' => self::TYPE_STRING, - 'description' => 'The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.', - 'default' => '', - 'example' => '', - ]) - ->addRule('stderr', [ - 'type' => self::TYPE_STRING, - 'description' => 'The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.', + '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.', 'default' => '', 'example' => '', ]) ->addRule('duration', [ 'type' => self::TYPE_FLOAT, - 'description' => 'The script execution duration in seconds.', + 'description' => 'Function execution duration in seconds.', 'default' => 0, 'example' => 0.400, ]) diff --git a/src/Appwrite/Utopia/Response/Model/Func.php b/src/Appwrite/Utopia/Response/Model/Func.php index c4044c0f2e..e32735b38e 100644 --- a/src/Appwrite/Utopia/Response/Model/Func.php +++ b/src/Appwrite/Utopia/Response/Model/Func.php @@ -49,6 +49,18 @@ class Func extends Model 'default' => true, 'example' => false, ]) + ->addRule('live', [ + 'type' => self::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.', + 'default' => true, + 'example' => false, + ]) + ->addRule('logging', [ + 'type' => self::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, + 'example' => false, + ]) ->addRule('runtime', [ 'type' => self::TYPE_STRING, 'description' => 'Function execution runtime.', @@ -85,7 +97,55 @@ class Func extends Model 'type' => self::TYPE_INTEGER, 'description' => 'Function execution timeout in seconds.', 'default' => 15, - 'example' => 15, + 'example' => 300, + ]) + ->addRule('entrypoint', [ + 'type' => self::TYPE_STRING, + 'description' => 'The entrypoint file used to execute the deployment.', + 'default' => '', + 'example' => 'index.js', + ]) + ->addRule('commands', [ + 'type' => self::TYPE_STRING, + 'description' => 'The build command used to build the deployment.', + 'default' => '', + 'example' => 'npm install', + ]) + ->addRule('version', [ + 'type' => self::TYPE_STRING, + 'description' => 'Version of Open Runtimes used for the function.', + 'default' => 'v3', + 'example' => 'v2', + ]) + ->addRule('installationId', [ + 'type' => self::TYPE_STRING, + 'description' => 'Function VCS (Version Control System) installation id.', + 'default' => '', + 'example' => '6m40at4ejk5h2u9s1hboo', + ]) + ->addRule('providerRepositoryId', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) Repository ID', + 'default' => '', + 'example' => 'appwrite', + ]) + ->addRule('providerBranch', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) branch name', + 'default' => '', + 'example' => 'main', + ]) + ->addRule('providerRootDirectory', [ + 'type' => self::TYPE_STRING, + 'description' => 'Path to function in VCS (Version Control System) repository', + 'default' => '', + 'example' => 'functions/helloWorld', + ]) + ->addRule('providerSilentMode', [ + 'type' => self::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', + 'default' => false, + 'example' => false, ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Headers.php b/src/Appwrite/Utopia/Response/Model/Headers.php new file mode 100644 index 0000000000..38ac4da722 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Headers.php @@ -0,0 +1,46 @@ +addRule('name', [ + 'type' => self::TYPE_STRING, + 'description' => 'Header name.', + 'default' => '', + 'example' => 'Content-Type', + ]) + ->addRule('value', [ + 'type' => self::TYPE_STRING, + 'description' => 'Header value.', + 'default' => '', + 'example' => 'application/json', + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Headers'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_HEADERS; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Identity.php b/src/Appwrite/Utopia/Response/Model/Identity.php new file mode 100644 index 0000000000..ff7f57a3e6 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Identity.php @@ -0,0 +1,95 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Identity ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Identity creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Identity update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('userId', [ + 'type' => self::TYPE_STRING, + 'description' => 'User ID.', + 'default' => '', + 'example' => '5e5bb8c16897e', + ]) + ->addRule('provider', [ + 'type' => self::TYPE_STRING, + 'description' => 'Identity Provider.', + 'default' => '', + 'example' => 'email', + ]) + ->addRule('providerUid', [ + 'type' => self::TYPE_STRING, + 'description' => 'ID of the User in the Identity Provider.', + 'default' => '', + 'example' => '5e5bb8c16897e', + ]) + ->addRule('providerEmail', [ + 'type' => self::TYPE_STRING, + 'description' => 'Email of the User in the Identity Provider.', + 'default' => '', + 'example' => 'user@example.com', + ]) + ->addRule('providerAccessToken', [ + 'type' => self::TYPE_STRING, + 'description' => 'Identity Provider Access Token.', + 'default' => '', + 'example' => 'MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3', + ]) + ->addRule('providerAccessTokenExpiry', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'The date of when the access token expires in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('providerRefreshToken', [ + 'type' => self::TYPE_STRING, + 'description' => 'Identity Provider Refresh Token.', + 'default' => '', + 'example' => 'MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3', + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Identity'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_IDENTITY; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Installation.php b/src/Appwrite/Utopia/Response/Model/Installation.php new file mode 100644 index 0000000000..29d29e8d5a --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Installation.php @@ -0,0 +1,72 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Function ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Function creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Function update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('provider', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) provider name.', + 'default' => [], + 'example' => 'github', + 'array' => false, + ]) + ->addRule('organization', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) organization name.', + 'default' => [], + 'example' => 'appwrite', + 'array' => false, + ]) + ->addRule('providerInstallationId', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) installation ID.', + 'default' => '', + 'example' => '5322', + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Installation'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_INSTALLATION; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Migration.php b/src/Appwrite/Utopia/Response/Model/Migration.php new file mode 100644 index 0000000000..78e8658032 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Migration.php @@ -0,0 +1,96 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Migration ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Variable creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Variable creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('status', [ + 'type' => self::TYPE_STRING, + 'description' => 'Migration status ( pending, processing, failed, completed ) ', + 'default' => '', + 'example' => 'pending', + ]) + ->addRule('stage', [ + 'type' => self::TYPE_STRING, + 'description' => 'Migration stage ( init, processing, source-check, destination-check, migrating, finished )', + 'default' => '', + 'example' => 'init', + ]) + ->addRule('source', [ + 'type' => self::TYPE_STRING, + 'description' => 'A string containing the type of source of the migration.', + 'default' => '', + 'example' => 'Appwrite', + ]) + ->addRule('resources', [ + 'type' => self::TYPE_STRING, + 'description' => 'Resources to migration.', + 'default' => [], + 'example' => ['user'], + 'array' => true + ]) + ->addRule('statusCounters', [ + 'type' => self::TYPE_JSON, + 'description' => 'A group of counters that represent the total progress of the migration.', + 'default' => [], + 'example' => '{"Database": {"PENDING": 0, "SUCCESS": 1, "ERROR": 0, "SKIP": 0, "PROCESSING": 0, "WARNING": 0}}', + ]) + ->addRule('resourceData', [ + 'type' => self::TYPE_JSON, + 'description' => 'An array of objects containing the report data of the resources that were migrated.', + 'default' => [], + 'example' => '[{"resource":"Database","id":"public","status":"SUCCESS","message":""}]', + ]) + ->addRule('errors', [ + 'type' => self::TYPE_STRING, + 'description' => 'All errors that occurred during the migration process.', + 'default' => [], + 'example' => [], + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Migration'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_MIGRATION; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/MigrationFirebaseProject.php b/src/Appwrite/Utopia/Response/Model/MigrationFirebaseProject.php new file mode 100644 index 0000000000..cf13c81483 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/MigrationFirebaseProject.php @@ -0,0 +1,46 @@ +addRule('projectId', [ + 'type' => self::TYPE_STRING, + 'description' => 'Project ID.', + 'default' => '', + 'example' => 'my-project', + ]) + ->addRule('displayName', [ + 'type' => self::TYPE_STRING, + 'description' => 'Project display name.', + 'default' => '', + 'example' => 'My Project', + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'MigrationFirebaseProject'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_MIGRATION_FIREBASE_PROJECT; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/MigrationReport.php b/src/Appwrite/Utopia/Response/Model/MigrationReport.php new file mode 100644 index 0000000000..15164d56fc --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/MigrationReport.php @@ -0,0 +1,89 @@ +addRule(Resource::TYPE_USER, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of users to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule(Resource::TYPE_TEAM, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of teams to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule(Resource::TYPE_DATABASE, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of databases to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule(Resource::TYPE_DOCUMENT, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of documents to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule(Resource::TYPE_FILE, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of files to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule(Resource::TYPE_BUCKET, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of buckets to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule(Resource::TYPE_FUNCTION, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of functions to be migrated.', + 'default' => 0, + 'example' => 20, + ]) + ->addRule('size', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Size of files to be migrated in mb.', + 'default' => 0, + 'example' => 30000, + ]) + ->addRule('version', [ + 'type' => self::TYPE_STRING, + 'description' => 'Version of the Appwrite instance to be migrated.', + 'default' => '', + 'example' => '1.4.0', + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Migration Report'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_MIGRATION_REPORT; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 45b3392fa4..20703ffbeb 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -166,13 +166,6 @@ class Project extends Model 'example' => new \stdClass(), 'array' => true, ]) - ->addRule('domains', [ - 'type' => Response::MODEL_DOMAIN, - 'description' => 'List of Domains.', - 'default' => [], - 'example' => new \stdClass(), - 'array' => true, - ]) ->addRule('smtpEnabled', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Status for custom SMTP', @@ -180,12 +173,24 @@ class Project extends Model 'example' => false, 'array' => false ]) - ->addRule('smtpSender', [ + ->addRule('smtpSenderName', [ + 'type' => self::TYPE_STRING, + 'description' => 'SMTP sender name', + 'default' => '', + 'example' => 'John Appwrite', + ]) + ->addRule('smtpSenderEmail', [ 'type' => self::TYPE_STRING, 'description' => 'SMTP sender email', 'default' => '', 'example' => 'john@appwrite.io', ]) + ->addRule('smtpReplyTo', [ + 'type' => self::TYPE_STRING, + 'description' => 'SMTP reply to email', + 'default' => '', + 'example' => 'support@appwrite.io', + ]) ->addRule('smtpHost', [ 'type' => self::TYPE_STRING, 'description' => 'SMTP server host name', @@ -284,7 +289,9 @@ class Project extends Model // SMTP $smtp = $document->getAttribute('smtp', []); $document->setAttribute('smtpEnabled', $smtp['enabled'] ?? false); - $document->setAttribute('smtpSender', $smtp['sender'] ?? ''); + $document->setAttribute('smtpSenderEmail', $smtp['senderEmail'] ?? ''); + $document->setAttribute('smtpSenderName', $smtp['senderName'] ?? ''); + $document->setAttribute('smtpReplyTo', $smtp['replyTo'] ?? ''); $document->setAttribute('smtpHost', $smtp['host'] ?? ''); $document->setAttribute('smtpPort', $smtp['port'] ?? ''); $document->setAttribute('smtpUsername', $smtp['username'] ?? ''); diff --git a/src/Appwrite/Utopia/Response/Model/ProviderRepository.php b/src/Appwrite/Utopia/Response/Model/ProviderRepository.php new file mode 100644 index 0000000000..c133ae3164 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/ProviderRepository.php @@ -0,0 +1,78 @@ +addRule('id', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) repository ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('name', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) repository name.', + 'default' => '', + 'example' => 'appwrite', + ]) + ->addRule('organization', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) organization name', + 'default' => [], + 'example' => 'appwrite', + 'array' => false, + ]) + ->addRule('provider', [ + 'type' => self::TYPE_STRING, + 'description' => 'VCS (Version Control System) provider name.', + 'default' => '', + 'example' => 'github', + ]) + ->addRule('private', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Is VCS (Version Control System) repository private?', + 'default' => false, + 'example' => true, + ]) + ->addRule('runtime', [ + 'type' => self::TYPE_STRING, + 'description' => 'Auto-detected runtime suggestion. Empty if getting response of getRuntime().', + 'default' => '', + 'example' => 'node', + ]) + ->addRule('pushedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Last commit date in ISO 8601 format.', + 'default' => APP_DATABASE_ATTRIBUTE_DATETIME, + 'example' => APP_DATABASE_ATTRIBUTE_DATETIME, + 'array' => false, + ]); + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'ProviderRepository'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_PROVIDER_REPOSITORY; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php new file mode 100644 index 0000000000..077455b4a7 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -0,0 +1,92 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Rule ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Rule creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Rule update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('domain', [ + 'type' => self::TYPE_STRING, + 'description' => 'Domain name.', + 'default' => '', + 'example' => 'appwrite.company.com', + ]) + ->addRule('resourceType', [ + 'type' => self::TYPE_STRING, + 'description' => 'Action definition for the rule. Possible values are "api", "function", or "redirect"', + 'default' => '', + 'example' => 'function', + ]) + ->addRule('resourceId', [ + 'type' => self::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.', + 'default' => '', + 'example' => 'myAwesomeFunction', + ]) + ->addRule('status', [ + 'type' => self::TYPE_STRING, + 'description' => 'Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"', + 'default' => false, + 'example' => 'verified', + ]) + ->addRule('logs', [ + 'type' => self::TYPE_STRING, + 'description' => 'Certificate generation logs. This will return an empty string if generation did not run, or succeeded.', + 'default' => '', + 'example' => 'HTTP challegne failed.', + ]) + ->addRule('renewAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Certificate auto-renewal date in ISO 8601 format.', + 'default' => APP_DATABASE_ATTRIBUTE_DATETIME, + 'example' => APP_DATABASE_ATTRIBUTE_DATETIME, + 'array' => false, + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Rule'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_PROXY_RULE; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/UsageBuckets.php b/src/Appwrite/Utopia/Response/Model/UsageBuckets.php index 83b8744760..8c6c81f234 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageBuckets.php +++ b/src/Appwrite/Utopia/Response/Model/UsageBuckets.php @@ -16,7 +16,7 @@ class UsageBuckets extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('filesTotal', [ + ->addRule('filesCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of files in this bucket.', 'default' => [], @@ -30,6 +30,34 @@ class UsageBuckets extends Model 'example' => [], 'array' => true ]) + ->addRule('filesCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageCollection.php b/src/Appwrite/Utopia/Response/Model/UsageCollection.php index 5abcf46b7d..8b6966fcd2 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageCollection.php +++ b/src/Appwrite/Utopia/Response/Model/UsageCollection.php @@ -16,13 +16,41 @@ class UsageCollection extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('documentsTotal', [ + ->addRule('documentsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of documents.', 'default' => [], 'example' => [], 'array' => true ]) + ->addRule('documentsCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index 58d49c506e..0c84d796ba 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -16,16 +16,72 @@ class UsageDatabase extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('collectionsTotal', [ + ->addRule('documentsCount', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for total number of documents.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of collections.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documentsTotal', [ + ->addRule('documentsCreate', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of documents.', + 'description' => 'Aggregated stats for documents created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections delete.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index a6008ca9e6..93488a47db 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -16,23 +16,107 @@ class UsageDatabases extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('databasesTotal', [ + ->addRule('databasesCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of documents.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('collectionsTotal', [ + ->addRule('documentsCount', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for total number of documents.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of collections.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documentsTotal', [ + ->addRule('databasesCreate', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of documents.', + 'description' => 'Aggregated stats for documents created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databasesRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databasesUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databasesDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for total number of collections.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for documents deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collectionsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for collections delete.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunction.php b/src/Appwrite/Utopia/Response/Model/UsageFunction.php index 03acaa750a..58d76bbf41 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunction.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunction.php @@ -16,16 +16,30 @@ class UsageFunction extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('deploymentsTotal', [ + ->addRule('executionsTotal', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of function deployments.', + 'description' => 'Aggregated stats for number of function executions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('deploymentsStorage', [ + ->addRule('executionsFailure', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function deployments storage.', + 'description' => 'Aggregated stats for function execution failures.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('executionsSuccess', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for function execution successes.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('executionsTime', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for function execution duration.', 'default' => [], 'example' => [], 'array' => true @@ -37,31 +51,23 @@ class UsageFunction extends Model 'example' => [], 'array' => true ]) - ->addRule('buildsStorage', [ + ->addRule('buildsFailure', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for builds storage.', + 'description' => 'Aggregated stats for function build failures.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('buildsSuccess', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for function build successes.', 'default' => [], 'example' => [], 'array' => true ]) ->addRule('buildsTime', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build compute.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('executionsTotal', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of function executions.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - - ->addRule('executionsTime', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution compute.', + 'description' => 'Aggregated stats for function build duration.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php index 6ab36e21ac..7adb0d4aa3 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php @@ -16,23 +16,30 @@ class UsageFunctions extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('functionsTotal', [ + ->addRule('executionsTotal', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of functions.', + 'description' => 'Aggregated stats for number of function executions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('deploymentsTotal', [ + ->addRule('executionsFailure', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of function deployments.', + 'description' => 'Aggregated stats for function execution failures.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('deploymentsStorage', [ + ->addRule('executionsSuccess', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function deployments storage.', + 'description' => 'Aggregated stats for function execution successes.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('executionsTime', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for function execution duration.', 'default' => [], 'example' => [], 'array' => true @@ -44,31 +51,23 @@ class UsageFunctions extends Model 'example' => [], 'array' => true ]) - ->addRule('buildsStorage', [ + ->addRule('buildsFailure', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for builds storage.', + 'description' => 'Aggregated stats for function build failures.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('buildsSuccess', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for function build successes.', 'default' => [], 'example' => [], 'array' => true ]) ->addRule('buildsTime', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build compute.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('executionsTotal', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of function executions.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - - ->addRule('executionsTime', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution compute.', + 'description' => 'Aggregated stats for function build duration.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index 641613809a..e37bc5928d 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -16,7 +16,7 @@ class UsageProject extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('requestsTotal', [ + ->addRule('requests', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of requests.', 'default' => [], @@ -30,42 +30,42 @@ class UsageProject extends Model 'example' => [], 'array' => true ]) - ->addRule('executionsTotal', [ + ->addRule('executions', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function executions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documentsTotal', [ + ->addRule('documents', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of documents.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('databasesTotal', [ + ->addRule('databases', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of databases.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('usersTotal', [ + ->addRule('users', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of users.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('filesStorage', [ + ->addRule('storage', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for the occupied storage size (in bytes).', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('bucketsTotal', [ + ->addRule('buckets', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of buckets.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageStorage.php b/src/Appwrite/Utopia/Response/Model/UsageStorage.php index 88d0beca01..7e3c08e12a 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageStorage.php +++ b/src/Appwrite/Utopia/Response/Model/UsageStorage.php @@ -16,23 +16,79 @@ class UsageStorage extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('bucketsTotal', [ + ->addRule('storage', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of buckets.', + 'description' => 'Aggregated stats for the occupied storage size (in bytes).', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('filesTotal', [ + ->addRule('filesCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of files.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('filesStorage', [ + ->addRule('bucketsCount', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for the occupied storage size (in bytes).', + 'description' => 'Aggregated stats for total number of buckets.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('bucketsCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for buckets created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('bucketsRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for buckets read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('bucketsUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for buckets updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('bucketsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for buckets deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('filesDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for files deleted.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageUsers.php b/src/Appwrite/Utopia/Response/Model/UsageUsers.php index c0cc4baa54..4c7b37d50f 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageUsers.php +++ b/src/Appwrite/Utopia/Response/Model/UsageUsers.php @@ -16,21 +16,62 @@ class UsageUsers extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('usersTotal', [ + ->addRule('usersCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of users.', 'default' => [], 'example' => [], 'array' => true ]) - - ->addRule('sessionsTotal', [ + ->addRule('usersCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for users created.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('usersRead', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for users read.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('usersUpdate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for users updated.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('usersDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for users deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('sessionsCreate', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for sessions created.', 'default' => [], 'example' => [], 'array' => true ]) + ->addRule('sessionsProviderCreate', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('sessionsDelete', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for sessions deleted.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Variable.php b/src/Appwrite/Utopia/Response/Model/Variable.php index f4b3bcf2bb..88fcd14ca1 100644 --- a/src/Appwrite/Utopia/Response/Model/Variable.php +++ b/src/Appwrite/Utopia/Response/Model/Variable.php @@ -41,11 +41,17 @@ class Variable extends Model 'default' => '', 'example' => 'myPa$$word1', ]) - ->addRule('functionId', [ + ->addRule('resourceType', [ 'type' => self::TYPE_STRING, - 'description' => 'Function ID.', + 'description' => 'Service to which the variable belongs. Possible values are "project", "function"', 'default' => '', - 'example' => '5e5ea5c16897e', + 'example' => 'function', + ]) + ->addRule('resourceId', [ + 'type' => self::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.', + 'default' => '', + 'example' => 'myAwesomeFunction', ]) ; } diff --git a/src/Appwrite/Vcs/Comment.php b/src/Appwrite/Vcs/Comment.php new file mode 100644 index 0000000000..1107e0ee70 --- /dev/null +++ b/src/Appwrite/Vcs/Comment.php @@ -0,0 +1,126 @@ +builds) === 0; + } + + public function addBuild(Document $project, Document $function, string $buildStatus, string $deploymentId, array $action): void + { + // Unique index + $id = $project->getId() . '_' . $function->getId(); + + $this->builds[$id] = [ + 'projectName' => $project->getAttribute('name'), + 'projectId' => $project->getId(), + 'functionName' => $function->getAttribute('name'), + 'functionId' => $function->getId(), + 'buildStatus' => $buildStatus, + 'deploymentId' => $deploymentId, + 'action' => $action, + ]; + } + + public function generateComment(): string + { + $json = \json_encode($this->builds); + + $text = $this->statePrefix . \base64_encode($json) . "\n\n"; + + $projects = []; + + foreach ($this->builds as $id => $build) { + if (!\array_key_exists($build['projectId'], $projects)) { + $projects[$build['projectId']] = [ + 'name' => $build['projectName'], + 'functions' => [] + ]; + } + + $projects[$build['projectId']]['functions'][$build['functionId']] = [ + 'name' => $build['functionName'], + 'status' => $build['buildStatus'], + 'deploymentId' => $build['deploymentId'], + 'action' => $build['action'], + ]; + } + + //TODO: Update link to documentation + $text .= "**Your function has been automatically deployed.** Learn more about Appwrite [Function Deployments](https://appwrite.io/docs/functions).\n\n"; + + foreach ($projects as $projectId => $project) { + $text .= "**{$project['name']}** `{$projectId}`\n\n"; + $text .= "| Function | ID | Status | Action |\n"; + $text .= "| :- | :- | :- | :- |\n"; + + $protocol = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https'; + $hostname = App::getEnv('_APP_DOMAIN'); + + foreach ($project['functions'] as $functionId => $function) { + $generateImage = function (string $status) use ($protocol, $hostname) { + $extention = $status === 'building' ? 'gif' : 'png'; + $imagesUrl = $protocol . '://' . $hostname . '/images/vcs/'; + $imageUrl = '' . $status . ''; + + return $imageUrl; + }; + + $status = match ($function['status']) { + 'waiting' => $generateImage('waiting') . ' Waiting to build', + 'processing' => $generateImage('processing') . ' Processing', + 'building' => $generateImage('building') . ' Building', + 'ready' => $generateImage('ready') . ' Ready', + 'failed' => $generateImage('failed') . ' Failed', + }; + + if ($function['action']['type'] === 'logs') { + $action = '[View Logs](' . $protocol . '://' . $hostname . '/console/project-' . $projectId . '/functions/function-' . $functionId . '/deployment-' . $function['deploymentId'] . ')'; + } else { + $action = '[Authorize](' . $function['action']['url'] . ')'; + } + + $text .= "| {$function['name']} | `{$functionId}` | {$status} | {$action} |\n"; + } + + $text .= "\n\n"; + } + //TODO: Update did you know section + $tip = $this->tips[array_rand($this->tips)]; + $text .= "> **💡 Did you know?** \n " . $tip . "\n\n"; + + return $text; + } + + public function parseComment(string $comment): self + { + $state = \explode("\n", $comment)[0] ?? ''; + $state = substr($state, strlen($this->statePrefix)); + + $json = \base64_decode($state); + + $builds = \json_decode($json, true); + $this->builds = $builds; + + return $this; + } +} diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index bd49e5cf20..36f6ad0dc5 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -35,10 +35,11 @@ class Executor $this->endpoint = $endpoint; $this->cpus = \intval(App::getEnv('_APP_FUNCTIONS_CPUS', '1')); - $this->memory = intval(App::getEnv('_APP_FUNCTIONS_MEMORY', '512')); + $this->memory = \intval(App::getEnv('_APP_FUNCTIONS_MEMORY', '512')); $this->headers = [ 'content-type' => 'application/json', 'authorization' => 'Bearer ' . App::getEnv('_APP_EXECUTOR_SECRET', ''), + 'x-opr-addressing-method' => 'anycast-efficient' ]; } @@ -53,43 +54,90 @@ class Executor * @param string $image * @param bool $remove * @param string $entrypoint - * @param string $workdir * @param string $destination * @param array $variables - * @param array $commands + * @param string $command */ public function createRuntime( string $deploymentId, string $projectId, string $source, string $image, + string $version, bool $remove = false, string $entrypoint = '', - string $workdir = '', string $destination = '', array $variables = [], - array $commands = [] + string $command = null, ) { $runtimeId = "$projectId-$deploymentId"; $route = "/runtimes"; - $headers = [ 'x-opr-runtime-id' => $runtimeId ]; $params = [ 'runtimeId' => $runtimeId, 'source' => $source, 'destination' => $destination, 'image' => $image, 'entrypoint' => $entrypoint, - 'workdir' => $workdir, 'variables' => $variables, 'remove' => $remove, - 'commands' => $commands, + 'command' => $command, 'cpus' => $this->cpus, 'memory' => $this->memory, + 'version' => $version, ]; $timeout = (int) App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900); - $response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $timeout); + $response = $this->call(self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout); + + $status = $response['headers']['status-code']; + if ($status >= 400) { + $message = \is_string($response['body']) ? $response['body'] : $response['body']['message']; + throw new \Exception($message, $status); + } + + return $response['body']; + } + + /** + * Listen to realtime logs stream of a runtime + * + * @param string $deploymentId + * @param string $projectId + * @param callable $callback + */ + public function getLogs( + string $deploymentId, + string $projectId, + callable $callback + ) { + $timeout = (int) App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900); + + $runtimeId = "$projectId-$deploymentId"; + $route = "/runtimes/{$runtimeId}/logs"; + $params = [ + 'timeout' => $timeout + ]; + + $this->call(self::METHOD_GET, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout, $callback); + } + + /** + * Delete Runtime + * + * Deletes a runtime and cleans up any containers remaining. + * + * @param string $projectId + * @param string $deploymentId + */ + public function deleteRuntime(string $projectId, string $deploymentId) + { + $runtimeId = "$projectId-$deploymentId"; + $route = "/runtimes/$runtimeId"; + + $response = $this->call(self::METHOD_DELETE, $route, [ + 'x-opr-addressing-method' => 'broadcast' + ], [], true, 30); $status = $response['headers']['status-code']; if ($status >= 400) { @@ -105,44 +153,58 @@ class Executor * * @param string $projectId * @param string $deploymentId - * @param string $payload + * @param string $body * @param array $variables * @param int $timeout * @param string $image * @param string $source * @param string $entrypoint + * @param string $runtimeEntrypoint * * @return array */ public function createExecution( string $projectId, string $deploymentId, - string $payload, + ?string $body, array $variables, int $timeout, string $image, string $source, string $entrypoint, + string $version, + string $path, + string $method, + array $headers, + string $runtimeEntrypoint = null, ) { + if (empty($headers['host'])) { + $headers['host'] = App::getEnv('_APP_DOMAIN', ''); + } + $runtimeId = "$projectId-$deploymentId"; $route = '/runtimes/' . $runtimeId . '/execution'; - $headers = [ 'x-opr-runtime-id' => $runtimeId ]; $params = [ 'runtimeId' => $runtimeId, 'variables' => $variables, - 'payload' => $payload, + 'body' => $body, 'timeout' => $timeout, + 'path' => $path, + 'method' => $method, + 'headers' => $headers, 'image' => $image, 'source' => $source, 'entrypoint' => $entrypoint, 'cpus' => $this->cpus, 'memory' => $this->memory, + 'version' => $version, + 'runtimeEntrypoint' => $runtimeEntrypoint, ]; $timeout = (int) App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900); - $response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $timeout); + $response = $this->call(self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout); $status = $response['headers']['status-code']; if ($status >= 400) { @@ -166,7 +228,7 @@ class Executor * @return array|string * @throws Exception */ - public function call(string $method, string $path = '', array $headers = [], array $params = [], bool $decode = true, int $timeout = 15) + public function call(string $method, string $path = '', array $headers = [], array $params = [], bool $decode = true, int $timeout = 15, callable $callback = null) { $headers = array_merge($this->headers, $headers); $ch = curl_init($this->endpoint . $path . (($method == self::METHOD_GET && !empty($params)) ? '?' . http_build_query($params) : '')); @@ -194,8 +256,20 @@ class Executor unset($headers[$i]); } + if (isset($callback)) { + $headers[] = 'accept: text/event-stream'; + + $handleEvent = function ($ch, $data) use ($callback) { + $callback($data); + return \strlen($data); + }; + + curl_setopt($ch, CURLOPT_WRITEFUNCTION, $handleEvent); + } else { + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + } + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); @@ -224,6 +298,12 @@ class Executor } $responseBody = curl_exec($ch); + + if (isset($callback)) { + curl_close($ch); + return []; + } + $responseType = $responseHeaders['content-type'] ?? ''; $responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index c8c4f21165..fdea53d68b 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\General; +use Appwrite\Tests\Retry; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -9,733 +10,789 @@ use Tests\E2E\Scopes\SideServer; use CURLFile; use Tests\E2E\Services\Functions\FunctionsBase; use Utopia\Database\DateTime; -use Utopia\Database\Helpers\Permission; -use Utopia\Database\Helpers\Role; -use Utopia\Database\Validator\Datetime as DatetimeValidator; - -class UsageTest extends Scope -{ - use ProjectCustom; - use SideServer; - use FunctionsBase; - - private const WAIT = 35; - private const CREATE = 20; - - protected string $projectId; - - public function setUp(): void - { - parent::setUp(); - } - - protected static string $formatTz = 'Y-m-d\TH:i:s.vP'; - - protected function validateDates(array $metrics): void - { - foreach ($metrics as $metric) { - $this->assertIsObject(\DateTime::createFromFormat("Y-m-d\TH:i:s.vP", $metric['date'])); - } - } - - public function testPrepareUsersStats(): array - { - $project = $this->getProject(true); - $projectId = $project['$id']; - $headers['x-appwrite-project'] = $project['$id']; - $headers['x-appwrite-key'] = $project['apiKey']; - $headers['content-type'] = 'application/json'; - - $usersTotal = 0; - $requestsTotal = 0; - for ($i = 0; $i < self::CREATE; $i++) { - $email = uniqid() . 'user@usage.test'; - $password = 'password'; - $name = uniqid() . 'User'; - $res = $this->client->call( - Client::METHOD_POST, - '/users', - $headers, - [ - 'userId' => 'unique()', - 'email' => $email, - 'password' => $password, - 'name' => $name, - ] - ); - - $this->assertEquals($email, $res['body']['email']); - $this->assertNotEmpty($res['body']['$id']); - $usersTotal++; - $requestsTotal++; - - if ($i < (self::CREATE / 2)) { - $userId = $res['body']['$id']; - $res = $this->client->call(Client::METHOD_DELETE, '/users/' . $userId, $headers); - $this->assertEmpty($res['body']); - $requestsTotal++; - $usersTotal--; - } - } - - return [ - 'projectId' => $projectId, - 'headers' => $headers, - 'usersTotal' => $usersTotal, - 'requestsTotal' => $requestsTotal - ]; - } - - /** - * @depends testPrepareUsersStats - */ - public function testUsersStats(array $data): array - { - sleep(self::WAIT); - - $projectId = $data['projectId']; - $headers = $data['headers']; - $usersTotal = $data['usersTotal']; - $requestsTotal = $data['requestsTotal']; - - $consoleHeaders = [ - 'origin' => 'http://localhost', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin', - ]; - - $res = $this->client->call( - Client::METHOD_GET, - '/project/usage?range=24h', - $consoleHeaders - ); - $res = $res['body']; - - $this->assertEquals('24h', $res['range']); - $this->assertEquals(9, count($res)); - $this->assertEquals(24, count($res['requestsTotal'])); - $this->assertEquals(24, count($res['usersTotal'])); - $this->assertEquals($usersTotal, $res['usersTotal'][array_key_last($res['usersTotal'])]['value']); - $this->validateDates($res['usersTotal']); - $this->assertEquals($requestsTotal, $res['requestsTotal'][array_key_last($res['requestsTotal'])]['value']); - $this->validateDates($res['requestsTotal']); - - $res = $this->client->call( - Client::METHOD_GET, - '/users/usage?range=90d', - $consoleHeaders - ); - - $res = $res['body']; - $this->assertEquals('90d', $res['range']); - $this->assertEquals(90, count($res['usersTotal'])); - $this->assertEquals(90, count($res['sessionsTotal'])); - $this->assertEquals((self::CREATE / 2), $res['usersTotal'][array_key_last($res['usersTotal'])]['value']); - - return [ - 'projectId' => $projectId, - 'headers' => $headers, - 'consoleHeaders' => $consoleHeaders, - 'requestsTotal' => $requestsTotal, - ]; - } - - /** @depends testUsersStats */ - public function testPrepareStorageStats(array $data): array - { - $headers = $data['headers']; - $bucketsTotal = 0; - $requestsTotal = $data['requestsTotal']; - $storageTotal = 0; - $filesTotal = 0; - - - for ($i = 0; $i < self::CREATE; $i++) { - $name = uniqid() . ' bucket'; - $res = $this->client->call( - Client::METHOD_POST, - '/storage/buckets', - $headers, - [ - 'bucketId' => 'unique()', - 'name' => $name, - 'fileSecurity' => false, - 'permissions' => [ - Permission::read(Role::any()), - Permission::create(Role::any()), - Permission::update(Role::any()), - Permission::delete(Role::any()), - ], - ] - ); - $this->assertEquals($name, $res['body']['name']); - $this->assertNotEmpty($res['body']['$id']); - $bucketId = $res['body']['$id']; - $bucketsTotal++; - $requestsTotal++; - - if ($i < (self::CREATE / 2)) { - $res = $this->client->call( - Client::METHOD_DELETE, - '/storage/buckets/' . $bucketId, - $headers - ); - $this->assertEmpty($res['body']); - $requestsTotal++; - $bucketsTotal--; - } - } - - // upload some files - $files = [ - [ - 'path' => realpath(__DIR__ . '/../../resources/logo.png'), - 'name' => 'logo.png', - ], - [ - 'path' => realpath(__DIR__ . '/../../resources/file.png'), - 'name' => 'file.png', - ], - [ - 'path' => realpath(__DIR__ . '/../../resources/disk-a/kitten-3.gif'), - 'name' => 'kitten-3.gif', - ], - [ - 'path' => realpath(__DIR__ . '/../../resources/disk-a/kitten-1.jpg'), - 'name' => 'kitten-1.jpg', - ], - ]; - - for ($i = 0; $i < self::CREATE; $i++) { - $file = $files[$i % count($files)]; - - $res = $this->client->call( - Client::METHOD_POST, - '/storage/buckets/' . $bucketId . '/files', - array_merge($headers, ['content-type' => 'multipart/form-data']), - [ - 'fileId' => 'unique()', - 'file' => new CURLFile($file['path'], '', $file['name']), - ] - ); - - $this->assertNotEmpty($res['body']['$id']); - - $fileSize = $res['body']['sizeOriginal']; - $storageTotal += $fileSize; - $filesTotal++; - $requestsTotal++; - - $fileId = $res['body']['$id']; - if ($i < (self::CREATE / 2)) { - $res = $this->client->call( - Client::METHOD_DELETE, - '/storage/buckets/' . $bucketId . '/files/' . $fileId, - $headers - ); - $this->assertEmpty($res['body']); - $requestsTotal++; - $filesTotal--; - $storageTotal -= $fileSize; - } - } - - return array_merge($data, [ - 'bucketId' => $bucketId, - 'bucketsTotal' => $bucketsTotal, - 'requestsTotal' => $requestsTotal, - 'storageTotal' => $storageTotal, - 'filesTotal' => $filesTotal, - ]); - } - - /** - * @depends testPrepareStorageStats - */ - public function testStorageStats(array $data): array - { - $bucketId = $data['bucketId']; - $bucketsTotal = $data['bucketsTotal']; - $requestsTotal = $data['requestsTotal']; - $storageTotal = $data['storageTotal']; - $filesTotal = $data['filesTotal']; - - sleep(self::WAIT); - - $res = $this->client->call( - Client::METHOD_GET, - '/project/usage?range=30d', - array_merge( - $data['headers'], - $data['consoleHeaders'] - ) - ); - $res = $res['body']; - - $this->assertEquals(9, count($res)); - $this->assertEquals(30, count($res['requestsTotal'])); - $this->assertEquals(30, count($res['filesStorage'])); - $this->assertEquals($requestsTotal, $res['requestsTotal'][array_key_last($res['requestsTotal'])]['value']); - $this->validateDates($res['requestsTotal']); - $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); - $this->validateDates($res['filesStorage']); - - $res = $this->client->call( - Client::METHOD_GET, - '/storage/usage?range=30d', - array_merge( - $data['headers'], - $data['consoleHeaders'] - ) - ); - - $res = $res['body']; - $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); - $this->validateDates($res['filesStorage']); - $this->assertEquals($bucketsTotal, $res['bucketsTotal'][array_key_last($res['bucketsTotal'])]['value']); - $this->validateDates($res['bucketsTotal']); - $this->assertEquals($filesTotal, $res['filesTotal'][array_key_last($res['filesTotal'])]['value']); - $this->validateDates($res['filesTotal']); - - $res = $this->client->call( - Client::METHOD_GET, - '/storage/' . $bucketId . '/usage?range=30d', - array_merge( - $data['headers'], - $data['consoleHeaders'] - ) - ); - - $res = $res['body']; - $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); - $this->assertEquals($filesTotal, $res['filesTotal'][array_key_last($res['filesTotal'])]['value']); - - $data['requestsTotal'] = $requestsTotal; - - return $data; - } - - /** @depends testStorageStats */ - public function testPrepareDatabaseStats(array $data): array - { - $headers = $data['headers']; - - $requestsTotal = $data['requestsTotal']; - $databasesTotal = 0; - $collectionsTotal = 0; - $documentsTotal = 0; - - for ($i = 0; $i < self::CREATE; $i++) { - $name = uniqid() . ' database'; - $res = $this->client->call( - Client::METHOD_POST, - '/databases', - $headers, - [ - 'databaseId' => 'unique()', - 'name' => $name, - ] - ); - - - $this->assertEquals($name, $res['body']['name']); - $this->assertNotEmpty($res['body']['$id']); - $databaseId = $res['body']['$id']; - - $requestsTotal++; - $databasesTotal++; - - if ($i < (self::CREATE / 2)) { - $res = $this->client->call( - Client::METHOD_DELETE, - '/databases/' . $databaseId, - $headers - ); - $this->assertEmpty($res['body']); - - $databasesTotal--; - $requestsTotal++; - } - } - - for ($i = 0; $i < self::CREATE; $i++) { - $name = uniqid() . ' collection'; - $res = $this->client->call( - Client::METHOD_POST, - '/databases/' . $databaseId . '/collections', - $headers, - [ - 'collectionId' => 'unique()', - 'name' => $name, - 'documentSecurity' => false, - 'permissions' => [ - Permission::read(Role::any()), - Permission::create(Role::any()), - Permission::update(Role::any()), - Permission::delete(Role::any()), - ], - ] - ); - - $this->assertEquals($name, $res['body']['name']); - $this->assertNotEmpty($res['body']['$id']); - $collectionId = $res['body']['$id']; - - $requestsTotal++; - $collectionsTotal++; - - if ($i < (self::CREATE / 2)) { - $res = $this->client->call( - Client::METHOD_DELETE, - '/databases/' . $databaseId . '/collections/' . $collectionId, - $headers - ); - $this->assertEmpty($res['body']); - $collectionsTotal--; - $requestsTotal++; - } - } - - $res = $this->client->call( - Client::METHOD_POST, - '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', - $headers, - [ - 'key' => 'name', - 'size' => 255, - 'required' => true, - ] - ); - - $this->assertEquals('name', $res['body']['key']); - $requestsTotal++; - - sleep(self::WAIT); - - for ($i = 0; $i < self::CREATE; $i++) { - $name = uniqid() . ' collection'; - $res = $this->client->call( - Client::METHOD_POST, - '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', - $headers, - [ - 'documentId' => 'unique()', - 'data' => ['name' => $name] - ] - ); - $this->assertEquals($name, $res['body']['name']); - $this->assertNotEmpty($res['body']['$id']); - $documentId = $res['body']['$id']; - - $requestsTotal++; - $documentsTotal++; - - if ($i < (self::CREATE / 2)) { - $res = $this->client->call( - Client::METHOD_DELETE, - '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, - $headers - ); - $this->assertEmpty($res['body']); - $documentsTotal--; - $requestsTotal++; - } - } - - return array_merge($data, [ - 'databaseId' => $databaseId, - 'collectionId' => $collectionId, - 'requestsTotal' => $requestsTotal, - 'databasesTotal' => $databasesTotal, - 'collectionsTotal' => $collectionsTotal, - 'documentsTotal' => $documentsTotal, - ]); - } - - /** @depends testPrepareDatabaseStats */ - - public function testDatabaseStats(array $data): array - { - - $projectId = $data['projectId']; - $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; - $requestsTotal = $data['requestsTotal']; - $databasesTotal = $data['databasesTotal']; - $collectionsTotal = $data['collectionsTotal']; - $documentsTotal = $data['documentsTotal']; - - sleep(self::WAIT); - - $res = $this->client->call( - Client::METHOD_GET, - '/project/usage?range=30d', - $data['consoleHeaders'] - ); - $res = $res['body']; - - $this->assertEquals(9, count($res)); - $this->assertEquals(30, count($res['requestsTotal'])); - $this->assertEquals(30, count($res['filesStorage'])); - $this->assertEquals($requestsTotal, $res['requestsTotal'][array_key_last($res['requestsTotal'])]['value']); - $this->validateDates($res['requestsTotal']); - $this->assertEquals($databasesTotal, $res['databasesTotal'][array_key_last($res['databasesTotal'])]['value']); - $this->validateDates($res['databasesTotal']); - $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); - $this->validateDates($res['documentsTotal']); - - $res = $this->client->call( - Client::METHOD_GET, - '/databases/usage?range=30d', - $data['consoleHeaders'] - ); - $res = $res['body']; - - $this->assertEquals($databasesTotal, $res['databasesTotal'][array_key_last($res['databasesTotal'])]['value']); - $this->validateDates($res['databasesTotal']); - $this->assertEquals($collectionsTotal, $res['collectionsTotal'][array_key_last($res['collectionsTotal'])]['value']); - $this->validateDates($res['collectionsTotal']); - $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); - $this->validateDates($res['documentsTotal']); - - $res = $this->client->call( - Client::METHOD_GET, - '/databases/' . $databaseId . '/usage?range=30d', - $data['consoleHeaders'] - ); - $res = $res['body']; - - $this->assertEquals($collectionsTotal, $res['collectionsTotal'][array_key_last($res['collectionsTotal'])]['value']); - $this->validateDates($res['collectionsTotal']); - - $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); - $this->validateDates($res['documentsTotal']); - - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', $data['consoleHeaders']); - $res = $res['body']; - - $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); - $this->validateDates($res['documentsTotal']); - - $data['requestsTotal'] = $requestsTotal; - - return $data; - } - - - /** @depends testDatabaseStats */ - public function testPrepareFunctionsStats(array $data): array - { - $dateValidator = new DatetimeValidator(); - $headers = $data['headers']; - $executionTime = 0; - $executions = 0; - $failures = 0; - - $response1 = $this->client->call( - Client::METHOD_POST, - '/functions', - $headers, - [ - 'functionId' => 'unique()', - 'name' => 'Test', - 'runtime' => 'php-8.0', - 'vars' => [ - 'funcKey1' => 'funcValue1', - 'funcKey2' => 'funcValue2', - 'funcKey3' => 'funcValue3', - ], - 'events' => [ - 'users.*.create', - 'users.*.delete', - ], - 'schedule' => '0 0 1 1 *', - 'timeout' => 10, - ] - ); - - $functionId = $response1['body']['$id'] ?? ''; - - $this->assertEquals(201, $response1['headers']['status-code']); - $this->assertNotEmpty($response1['body']['$id']); - - $code = realpath(__DIR__ . '/../../resources/functions') . "/php/code.tar.gz"; - $this->packageCode('php'); - - $deployment = $this->client->call( - Client::METHOD_POST, - '/functions/' . $functionId . '/deployments', - array_merge($headers, ['content-type' => 'multipart/form-data',]), - [ - 'entrypoint' => 'index.php', - 'code' => new CURLFile($code, 'application/x-gzip', \basename($code)), - 'activate' => true - ] - ); - - $deploymentId = $deployment['body']['$id'] ?? ''; - - $this->assertEquals(202, $deployment['headers']['status-code']); - $this->assertNotEmpty($deployment['body']['$id']); - $this->assertEquals(true, (new DatetimeValidator())->isValid($deployment['body']['$createdAt'])); - $this->assertEquals('index.php', $deployment['body']['entrypoint']); - - // Wait for deployment to build. - sleep(self::WAIT + 20); - - $response = $this->client->call( - Client::METHOD_PATCH, - '/functions/' . $functionId . '/deployments/' . $deploymentId, - $headers - ); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']['$id']); - - $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); - $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$updatedAt'])); - $this->assertEquals($deploymentId, $response['body']['deployment']); - - $execution = $this->client->call( - Client::METHOD_POST, - '/functions/' . $functionId . '/executions', - $headers, - [ - 'async' => false, - ] - ); - - $this->assertEquals(201, $execution['headers']['status-code']); - $this->assertNotEmpty($execution['body']['$id']); - $this->assertEquals($functionId, $execution['body']['functionId']); - - $executionTime += (int) ($execution['body']['duration'] * 1000); - - if ($execution['body']['status'] == 'failed') { - $failures++; - } elseif ($execution['body']['status'] == 'completed') { - $executions++; - } - - $execution = $this->client->call( - Client::METHOD_POST, - '/functions/' . $functionId . '/executions', - $headers, - [ - 'async' => false, - ] - ); - - $this->assertEquals(201, $execution['headers']['status-code']); - $this->assertNotEmpty($execution['body']['$id']); - $this->assertEquals($functionId, $execution['body']['functionId']); - if ($execution['body']['status'] == 'failed') { - $failures++; - } elseif ($execution['body']['status'] == 'completed') { - $executions++; - } - $executionTime += (int) ($execution['body']['duration'] * 1000); - - $execution = $this->client->call( - Client::METHOD_POST, - '/functions/' . $functionId . '/executions', - $headers, - [ - 'async' => true, - ] - ); - - $this->assertEquals(202, $execution['headers']['status-code']); - $this->assertNotEmpty($execution['body']['$id']); - $this->assertEquals($functionId, $execution['body']['functionId']); - - sleep(self::WAIT); - - $execution = $this->client->call( - Client::METHOD_GET, - '/functions/' . $functionId . '/executions/' . $execution['body']['$id'], - $headers - ); - - if ($execution['body']['status'] == 'failed') { - $failures++; - } elseif ($execution['body']['status'] == 'completed') { - $executions++; - } - - $executionTime += (int) ($execution['body']['duration'] * 1000); - - return array_merge($data, [ - 'functionId' => $functionId, - 'executionTime' => $executionTime, - 'executions' => $executions, - 'failures' => $failures, - ]); - } - - /** @depends testPrepareFunctionsStats */ - public function testFunctionsStats(array $data): void - { - $functionId = $data['functionId']; - $executionTime = $data['executionTime']; - $executions = $data['executions']; - - sleep(self::WAIT); - - $response = $this->client->call( - Client::METHOD_GET, - '/functions/' . $functionId . '/usage?range=30d', - $data['consoleHeaders'] - ); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(8, count($response['body'])); - $this->assertEquals('30d', $response['body']['range']); - $this->assertIsArray($response['body']['deploymentsTotal']); - $this->assertIsArray($response['body']['deploymentsStorage']); - $this->assertIsArray($response['body']['buildsTotal']); - $this->assertIsArray($response['body']['buildsTime']); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['executionsTime']); - - $response = $response['body']; - - $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); - $this->validateDates($response['executionsTotal']); - $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); - $this->validateDates($response['executionsTime']); - - $response = $this->client->call( - Client::METHOD_GET, - '/functions/usage?range=30d', - $data['consoleHeaders'] - ); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(9, count($response['body'])); - $this->assertEquals($response['body']['range'], '30d'); - $this->assertIsArray($response['body']['functionsTotal']); - $this->assertIsArray($response['body']['deploymentsTotal']); - $this->assertIsArray($response['body']['deploymentsStorage']); - $this->assertIsArray($response['body']['buildsTotal']); - $this->assertIsArray($response['body']['buildsTime']); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['executionsTime']); - - $response = $response['body']; - - $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); - $this->validateDates($response['executionsTotal']); - $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); - $this->validateDates($response['executionsTime']); - $this->assertGreaterThan(0, $response['buildsTime'][array_key_last($response['buildsTime'])]['value']); - $this->validateDates($response['buildsTime']); - } - - public function tearDown(): void - { - $this->projectId = ''; - } -} +use Utopia\Database\Permission; +use Utopia\Database\Role; + +// TODO @christyjacob4 : enable test once usage stats are fixed +// class UsageTest extends Scope +// { +// use ProjectCustom; +// use SideServer; +// use FunctionsBase; + +// protected string $projectId; + +// protected function setUp(): void +// { +// parent::setUp(); +// } + +// protected static string $formatTz = 'Y-m-d\TH:i:s.vP'; + +// protected function validateDates(array $metrics): void +// { +// foreach ($metrics as $metric) { +// $this->assertIsObject(\DateTime::createFromFormat("Y-m-d\TH:i:s.vP", $metric['date'])); +// } +// } + +// public function testPrepareUsersStats(): array +// { +// $project = $this->getProject(true); +// $projectId = $project['$id']; +// $headers['x-appwrite-project'] = $project['$id']; +// $headers['x-appwrite-key'] = $project['apiKey']; +// $headers['content-type'] = 'application/json'; + +// $usersCount = 0; +// $requestsCount = 0; +// for ($i = 0; $i < 10; $i++) { +// $email = uniqid() . 'user@usage.test'; +// $password = 'password'; +// $name = uniqid() . 'User'; +// $res = $this->client->call(Client::METHOD_POST, '/users', $headers, [ +// 'userId' => 'unique()', +// 'email' => $email, +// 'password' => $password, +// 'name' => $name, +// ]); +// $this->assertEquals($email, $res['body']['email']); +// $this->assertNotEmpty($res['body']['$id']); +// $usersCount++; +// $requestsCount++; + +// if ($i < 5) { +// $userId = $res['body']['$id']; +// $res = $this->client->call(Client::METHOD_GET, '/users/' . $userId, $headers); +// $this->assertEquals($userId, $res['body']['$id']); +// $res = $this->client->call(Client::METHOD_DELETE, '/users/' . $userId, $headers); +// $this->assertEmpty($res['body']); +// $requestsCount += 2; +// $usersCount--; +// } +// } + +// return [ +// 'projectId' => $projectId, +// 'headers' => $headers, +// 'usersCount' => $usersCount, +// 'requestsCount' => $requestsCount +// ]; +// } + +// /** +// * @depends testPrepareUsersStats +// */ +// #[Retry(count: 1)] +// public function testUsersStats(array $data): array +// { +// sleep(20); + +// $projectId = $data['projectId']; +// $headers = $data['headers']; +// $usersCount = $data['usersCount']; +// $requestsCount = $data['requestsCount']; + +// // console request +// $headers = [ +// 'origin' => 'http://localhost', +// 'x-appwrite-project' => 'console', +// 'cookie' => 'a_session_console=' . $this->getRoot()['session'], +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin', +// ]; + +// $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); +// $res = $res['body']; + +// $this->assertEquals(9, count($res)); +// $this->assertEquals(30, count($res['requests'])); +// $this->assertEquals(30, count($res['users'])); +// $this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); +// $this->validateDates($res['users']); +// $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); +// $this->validateDates($res['requests']); + +// $res = $this->client->call(Client::METHOD_GET, '/users/usage?range=30d', array_merge($headers, [ +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin' +// ])); +// $requestsCount++; +// $res = $res['body']; +// $this->assertEquals(10, $res['usersCreate'][array_key_last($res['usersCreate'])]['value']); +// $this->validateDates($res['usersCreate']); +// $this->assertEquals(5, $res['usersRead'][array_key_last($res['usersRead'])]['value']); +// $this->validateDates($res['usersRead']); +// $this->assertEquals(5, $res['usersDelete'][array_key_last($res['usersDelete'])]['value']); +// $this->validateDates($res['usersDelete']); + +// return ['projectId' => $projectId, 'headers' => $headers, 'requestsCount' => $requestsCount]; +// } + +// /** @depends testUsersStats */ +// public function testPrepareStorageStats(array $data): array +// { +// $projectId = $data['projectId']; +// $headers = $data['headers']; + +// $bucketId = ''; +// $bucketsCount = 0; +// $requestsCount = $data['requestsCount']; +// $storageTotal = 0; +// $bucketsCreate = 0; +// $bucketsDelete = 0; +// $bucketsRead = 0; +// $filesCount = 0; +// $filesRead = 0; +// $filesCreate = 0; +// $filesDelete = 0; + +// for ($i = 0; $i < 10; $i++) { +// $name = uniqid() . ' bucket'; +// $res = $this->client->call(Client::METHOD_POST, '/storage/buckets', \array_merge($headers, [ +// 'content-type' => 'application/json' +// ]), [ +// 'bucketId' => 'unique()', +// 'name' => $name, +// 'fileSecurity' => false, +// 'permissions' => [ +// Permission::read(Role::any()), +// Permission::create(Role::any()), +// Permission::update(Role::any()), +// Permission::delete(Role::any()), +// ], +// ]); +// $this->assertEquals($name, $res['body']['name']); +// $this->assertNotEmpty($res['body']['$id']); +// $bucketId = $res['body']['$id']; + +// $bucketsCreate++; +// $bucketsCount++; +// $requestsCount++; + +// if ($i < 5) { +// $res = $this->client->call(Client::METHOD_GET, '/storage/buckets/' . $bucketId, $headers); +// $this->assertEquals($bucketId, $res['body']['$id']); +// $bucketsRead++; + +// $res = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId, $headers); +// $this->assertEmpty($res['body']); +// $bucketsDelete++; + +// $requestsCount += 2; +// $bucketsCount--; +// } +// } + +// // upload some files +// $files = [ +// [ +// 'path' => realpath(__DIR__ . '/../../resources/logo.png'), +// 'name' => 'logo.png', +// ], +// [ +// 'path' => realpath(__DIR__ . '/../../resources/file.png'), +// 'name' => 'file.png', +// ], +// [ +// 'path' => realpath(__DIR__ . '/../../resources/disk-a/kitten-3.gif'), +// 'name' => 'kitten-3.gif', +// ], +// [ +// 'path' => realpath(__DIR__ . '/../../resources/disk-a/kitten-1.jpg'), +// 'name' => 'kitten-1.jpg', +// ], +// ]; + +// for ($i = 0; $i < 10; $i++) { +// $file = $files[$i % count($files)]; +// $res = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucketId . '/files', array_merge($headers, ['content-type' => 'multipart/form-data']), [ +// 'fileId' => 'unique()', +// 'file' => new CURLFile($file['path'], '', $file['name']), +// ]); +// $this->assertNotEmpty($res['body']['$id']); + +// $fileSize = $res['body']['sizeOriginal']; +// $storageTotal += $fileSize; +// $filesCount++; +// $filesCreate++; +// $requestsCount++; + +// $fileId = $res['body']['$id']; +// if ($i < 5) { +// $res = $this->client->call(Client::METHOD_GET, '/storage/buckets/' . $bucketId . '/files/' . $fileId, $headers); +// $this->assertEquals($fileId, $res['body']['$id']); +// $filesRead++; + +// $res = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId . '/files/' . $fileId, $headers); +// $this->assertEmpty($res['body']); +// $filesDelete++; +// $requestsCount += 2; +// $filesCount--; +// $storageTotal -= $fileSize; +// } +// } + +// return array_merge($data, [ +// 'bucketId' => $bucketId, +// 'bucketsCount' => $bucketsCount, +// 'requestsCount' => $requestsCount, +// 'storageTotal' => $storageTotal, +// 'bucketsCreate' => $bucketsCreate, +// 'bucketsDelete' => $bucketsDelete, +// 'bucketsRead' => $bucketsRead, +// 'filesCount' => $filesCount, +// 'filesRead' => $filesRead, +// 'filesCreate' => $filesCreate, +// 'filesDelete' => $filesDelete, +// ]); +// } + +// /** +// * @depends testPrepareStorageStats +// */ +// #[Retry(count: 1)] +// public function testStorageStats(array $data): array +// { +// $projectId = $data['projectId']; +// $bucketId = $data['bucketId']; +// $bucketsCount = $data['bucketsCount']; +// $requestsCount = $data['requestsCount']; +// $storageTotal = $data['storageTotal']; +// $bucketsCreate = $data['bucketsCreate']; +// $bucketsDelete = $data['bucketsDelete']; +// $bucketsRead = $data['bucketsRead']; +// $filesCount = $data['filesCount']; +// $filesRead = $data['filesRead']; +// $filesCreate = $data['filesCreate']; +// $filesDelete = $data['filesDelete']; + +// sleep(20); + +// // console request +// $headers = [ +// 'origin' => 'http://localhost', +// 'x-appwrite-project' => 'console', +// 'cookie' => 'a_session_console=' . $this->getRoot()['session'], +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin', +// ]; + +// $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); +// $res = $res['body']; + +// $this->assertEquals(9, count($res)); +// $this->assertEquals(30, count($res['requests'])); +// $this->assertEquals(30, count($res['storage'])); +// $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); +// $this->validateDates($res['requests']); +// $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); +// $this->validateDates($res['storage']); + +// $res = $this->client->call(Client::METHOD_GET, '/storage/usage?range=30d', array_merge($headers, [ +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin' +// ])); +// $requestsCount++; +// $res = $res['body']; +// $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); +// $this->validateDates($res['storage']); +// $this->assertEquals($bucketsCount, $res['bucketsCount'][array_key_last($res['bucketsCount'])]['value']); +// $this->validateDates($res['bucketsCount']); +// $this->assertEquals($bucketsRead, $res['bucketsRead'][array_key_last($res['bucketsRead'])]['value']); +// $this->validateDates($res['bucketsRead']); +// $this->assertEquals($bucketsCreate, $res['bucketsCreate'][array_key_last($res['bucketsCreate'])]['value']); +// $this->validateDates($res['bucketsCreate']); +// $this->assertEquals($bucketsDelete, $res['bucketsDelete'][array_key_last($res['bucketsDelete'])]['value']); +// $this->validateDates($res['bucketsDelete']); +// $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); +// $this->validateDates($res['filesCount']); +// $this->assertEquals($filesRead, $res['filesRead'][array_key_last($res['filesRead'])]['value']); +// $this->validateDates($res['filesRead']); +// $this->assertEquals($filesCreate, $res['filesCreate'][array_key_last($res['filesCreate'])]['value']); +// $this->validateDates($res['filesCreate']); +// $this->assertEquals($filesDelete, $res['filesDelete'][array_key_last($res['filesDelete'])]['value']); +// $this->validateDates($res['filesDelete']); + +// $res = $this->client->call(Client::METHOD_GET, '/storage/' . $bucketId . '/usage?range=30d', array_merge($headers, [ +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin' +// ])); +// $requestsCount++; +// $res = $res['body']; +// $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); +// $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); +// $this->assertEquals($filesRead, $res['filesRead'][array_key_last($res['filesRead'])]['value']); +// $this->assertEquals($filesCreate, $res['filesCreate'][array_key_last($res['filesCreate'])]['value']); +// $this->assertEquals($filesDelete, $res['filesDelete'][array_key_last($res['filesDelete'])]['value']); + +// $data['requestsCount'] = $requestsCount; +// return $data; +// } + +// /** @depends testStorageStats */ +// public function testPrepareDatabaseStats(array $data): array +// { +// $headers = $data['headers']; +// $projectId = $data['projectId']; + +// $databaseId = ''; +// $collectionId = ''; + +// $requestsCount = $data['requestsCount']; +// $databasesCount = 0; +// $databasesCreate = 0; +// $databasesRead = 0; +// $databasesDelete = 0; + +// $collectionsCount = 0; +// $collectionsCreate = 0; +// $collectionsRead = 0; +// $collectionsUpdate = 0; +// $collectionsDelete = 0; + +// $documentsCount = 0; +// $documentsCreate = 0; +// $documentsRead = 0; +// $documentsDelete = 0; + +// for ($i = 0; $i < 10; $i++) { +// $name = uniqid() . ' database'; +// $res = $this->client->call(Client::METHOD_POST, '/databases', $headers, [ +// 'databaseId' => 'unique()', +// 'name' => $name, +// ]); +// $this->assertEquals($name, $res['body']['name']); +// $this->assertNotEmpty($res['body']['$id']); +// $databaseId = $res['body']['$id']; + +// $requestsCount++; +// $databasesCount++; +// $databasesCreate++; + +// if ($i < 5) { +// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, $headers); +// $this->assertEquals($databaseId, $res['body']['$id']); +// $databasesRead++; + +// $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, $headers); +// $this->assertEmpty($res['body']); +// $databasesDelete++; + +// $databasesCount--; +// $requestsCount += 2; +// } +// } + +// for ($i = 0; $i < 10; $i++) { +// $name = uniqid() . ' collection'; +// $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $headers, [ +// 'collectionId' => 'unique()', +// 'name' => $name, +// 'documentSecurity' => false, +// 'permissions' => [ +// Permission::read(Role::any()), +// Permission::create(Role::any()), +// Permission::update(Role::any()), +// Permission::delete(Role::any()), +// ], +// ]); +// $this->assertEquals($name, $res['body']['name']); +// $this->assertNotEmpty($res['body']['$id']); +// $collectionId = $res['body']['$id']; + +// $requestsCount++; +// $collectionsCount++; +// $collectionsCreate++; + +// if ($i < 5) { +// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId, $headers); +// $this->assertEquals($collectionId, $res['body']['$id']); +// $collectionsRead++; + +// $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, $headers); +// $this->assertEmpty($res['body']); +// $collectionsDelete++; + +// $collectionsCount--; +// $requestsCount += 2; +// } +// } + +// $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', $headers, [ +// 'key' => 'name', +// 'size' => 255, +// 'required' => true, +// ]); +// $this->assertEquals('name', $res['body']['key']); +// $collectionsUpdate++; +// $requestsCount++; +// sleep(20); + +// for ($i = 0; $i < 10; $i++) { +// $name = uniqid() . ' collection'; +// $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', $headers, [ +// 'documentId' => 'unique()', +// 'data' => ['name' => $name] +// ]); +// $this->assertEquals($name, $res['body']['name']); +// $this->assertNotEmpty($res['body']['$id']); +// $documentId = $res['body']['$id']; + +// $requestsCount++; +// $documentsCount++; +// $documentsCreate++; + +// if ($i < 5) { +// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, $headers); +// $this->assertEquals($documentId, $res['body']['$id']); +// $documentsRead++; + +// $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, $headers); +// $this->assertEmpty($res['body']); +// $documentsDelete++; + +// $documentsCount--; +// $requestsCount += 2; +// } +// } + +// $data = array_merge($data, [ +// 'databaseId' => $databaseId, +// 'collectionId' => $collectionId, + +// 'requestsCount' => $requestsCount, +// 'databasesCount' => $databasesCount, +// 'databasesCreate' => $databasesCreate, +// 'databasesRead' => $databasesRead, +// 'databasesDelete' => $databasesDelete, + +// 'collectionsCount' => $collectionsCount, +// 'collectionsCreate' => $collectionsCreate, +// 'collectionsRead' => $collectionsRead, +// 'collectionsUpdate' => $collectionsUpdate, +// 'collectionsDelete' => $collectionsDelete, + +// 'documentsCount' => $documentsCount, +// 'documentsCreate' => $documentsCreate, +// 'documentsRead' => $documentsRead, +// 'documentsDelete' => $documentsDelete, +// ]); + +// return $data; +// } + +// /** @depends testPrepareDatabaseStats */ +// #[Retry(count: 1)] +// public function testDatabaseStats(array $data): array +// { +// $headers = $data['headers']; +// $projectId = $data['projectId']; + +// $databaseId = $data['databaseId']; +// $collectionId = $data['collectionId']; + +// $requestsCount = $data['requestsCount']; +// $databasesCount = $data['databasesCount']; +// $databasesCreate = $data['databasesCreate']; +// $databasesRead = $data['databasesRead']; +// $databasesDelete = $data['databasesDelete']; + +// $collectionsCount = $data['collectionsCount']; +// $collectionsCreate = $data['collectionsCreate']; +// $collectionsRead = $data['collectionsRead']; +// $collectionsUpdate = $data['collectionsUpdate']; +// $collectionsDelete = $data['collectionsDelete']; + +// $documentsCount = $data['documentsCount']; +// $documentsCreate = $data['documentsCreate']; +// $documentsRead = $data['documentsRead']; +// $documentsDelete = $data['documentsDelete']; + +// sleep(20); + +// // check datbase stats +// $headers = [ +// 'origin' => 'http://localhost', +// 'x-appwrite-project' => 'console', +// 'cookie' => 'a_session_console=' . $this->getRoot()['session'], +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin', +// ]; + +// $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); +// $res = $res['body']; + +// $this->assertEquals(9, count($res)); +// $this->assertEquals(30, count($res['requests'])); +// $this->assertEquals(30, count($res['storage'])); +// $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); +// $this->validateDates($res['requests']); +// $this->assertEquals($databasesCount, $res['databases'][array_key_last($res['databases'])]['value']); +// $this->validateDates($res['databases']); +// $this->assertEquals($documentsCount, $res['documents'][array_key_last($res['documents'])]['value']); +// $this->validateDates($res['documents']); + +// $res = $this->client->call(Client::METHOD_GET, '/databases/usage?range=30d', array_merge($headers, [ +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin' +// ])); +// $res = $res['body']; +// $this->assertEquals($databasesCount, $res['databasesCount'][array_key_last($res['databasesCount'])]['value']); +// $this->validateDates($res['databasesCount']); +// $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); +// $this->validateDates($res['collectionsCount']); +// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); +// $this->validateDates($res['documentsCount']); + +// $this->assertEquals($databasesCreate, $res['databasesCreate'][array_key_last($res['databasesCreate'])]['value']); +// $this->validateDates($res['databasesCreate']); +// $this->assertEquals($databasesRead, $res['databasesRead'][array_key_last($res['databasesRead'])]['value']); +// $this->validateDates($res['databasesRead']); +// $this->assertEquals($databasesDelete, $res['databasesDelete'][array_key_last($res['databasesDelete'])]['value']); +// $this->validateDates($res['databasesDelete']); + +// $this->assertEquals($collectionsCreate, $res['collectionsCreate'][array_key_last($res['collectionsCreate'])]['value']); +// $this->validateDates($res['collectionsCreate']); +// $this->assertEquals($collectionsRead, $res['collectionsRead'][array_key_last($res['collectionsRead'])]['value']); +// $this->validateDates($res['collectionsRead']); +// $this->assertEquals($collectionsUpdate, $res['collectionsUpdate'][array_key_last($res['collectionsUpdate'])]['value']); +// $this->validateDates($res['collectionsUpdate']); +// $this->assertEquals($collectionsDelete, $res['collectionsDelete'][array_key_last($res['collectionsDelete'])]['value']); +// $this->validateDates($res['collectionsDelete']); + +// $this->assertEquals($documentsCreate, $res['documentsCreate'][array_key_last($res['documentsCreate'])]['value']); +// $this->validateDates($res['documentsCreate']); +// $this->assertEquals($documentsRead, $res['documentsRead'][array_key_last($res['documentsRead'])]['value']); +// $this->validateDates($res['documentsRead']); +// $this->assertEquals($documentsDelete, $res['documentsDelete'][array_key_last($res['documentsDelete'])]['value']); +// $this->validateDates($res['documentsDelete']); + +// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage?range=30d', array_merge($headers, [ +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin' +// ])); +// $res = $res['body']; +// $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); +// $this->validateDates($res['collectionsCount']); +// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); +// $this->validateDates($res['documentsCount']); + +// $this->assertEquals($collectionsCreate, $res['collectionsCreate'][array_key_last($res['collectionsCreate'])]['value']); +// $this->validateDates($res['collectionsCreate']); +// $this->assertEquals($collectionsRead, $res['collectionsRead'][array_key_last($res['collectionsRead'])]['value']); +// $this->validateDates($res['collectionsRead']); +// $this->assertEquals($collectionsUpdate, $res['collectionsUpdate'][array_key_last($res['collectionsUpdate'])]['value']); +// $this->validateDates($res['collectionsUpdate']); +// $this->assertEquals($collectionsDelete, $res['collectionsDelete'][array_key_last($res['collectionsDelete'])]['value']); +// $this->validateDates($res['collectionsDelete']); + +// $this->assertEquals($documentsCreate, $res['documentsCreate'][array_key_last($res['documentsCreate'])]['value']); +// $this->validateDates($res['documentsCreate']); +// $this->assertEquals($documentsRead, $res['documentsRead'][array_key_last($res['documentsRead'])]['value']); +// $this->validateDates($res['documentsRead']); +// $this->assertEquals($documentsDelete, $res['documentsDelete'][array_key_last($res['documentsDelete'])]['value']); +// $this->validateDates($res['documentsDelete']); + +// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', array_merge($headers, [ +// 'x-appwrite-project' => $projectId, +// 'x-appwrite-mode' => 'admin' +// ])); +// $res = $res['body']; +// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); +// $this->validateDates($res['documentsCount']); + +// $this->assertEquals($documentsCreate, $res['documentsCreate'][array_key_last($res['documentsCreate'])]['value']); +// $this->validateDates($res['documentsCreate']); +// $this->assertEquals($documentsRead, $res['documentsRead'][array_key_last($res['documentsRead'])]['value']); +// $this->validateDates($res['documentsRead']); +// $this->assertEquals($documentsDelete, $res['documentsDelete'][array_key_last($res['documentsDelete'])]['value']); +// $this->validateDates($res['documentsDelete']); + +// $data['requestsCount'] = $requestsCount; +// return $data; +// } + + +// /** @depends testDatabaseStats */ +// public function testPrepareFunctionsStats(array $data): array +// { +// $headers = $data['headers']; +// $functionId = ''; +// $executionTime = 0; +// $executions = 0; +// $failures = 0; + +// $response1 = $this->client->call(Client::METHOD_POST, '/functions', $headers, [ +// 'functionId' => 'unique()', +// 'name' => 'Test', +// 'runtime' => 'php-8.0', +// 'vars' => [ +// 'funcKey1' => 'funcValue1', +// 'funcKey2' => 'funcValue2', +// 'funcKey3' => 'funcValue3', +// ], +// 'events' => [ +// 'users.*.create', +// 'users.*.delete', +// ], +// 'schedule' => '0 0 1 1 *', +// 'timeout' => 10, +// ]); + +// $functionId = $response1['body']['$id'] ?? ''; + +// $this->assertEquals(201, $response1['headers']['status-code']); +// $this->assertNotEmpty($response1['body']['$id']); + +// $code = realpath(__DIR__ . '/../../resources/functions') . "/php/code.tar.gz"; +// $this->packageCode('php'); + +// $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge($headers, ['content-type' => 'multipart/form-data',]), [ +// 'entrypoint' => 'index.php', +// 'code' => new CURLFile($code, 'application/x-gzip', \basename($code)), +// 'activate' => true +// ]); + +// $deploymentId = $deployment['body']['$id'] ?? ''; + +// $this->assertEquals(202, $deployment['headers']['status-code']); +// $this->assertNotEmpty($deployment['body']['$id']); +// $this->assertEquals(true, DateTime::isValid($deployment['body']['$createdAt'])); +// $this->assertEquals('index.php', $deployment['body']['entrypoint']); + +// // Wait for deployment to build. +// sleep(30); + +// $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, $headers, []); + +// $this->assertEquals(200, $response['headers']['status-code']); +// $this->assertNotEmpty($response['body']['$id']); +// $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); +// $this->assertEquals(true, DateTime::isValid($response['body']['$updatedAt'])); +// $this->assertEquals($deploymentId, $response['body']['deployment']); + +// $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', $headers, [ +// 'async' => false, +// ]); + +// $this->assertEquals(201, $execution['headers']['status-code']); +// $this->assertNotEmpty($execution['body']['$id']); +// $this->assertEquals($functionId, $execution['body']['functionId']); +// $executionTime += (int) ($execution['body']['duration'] * 1000); +// if ($execution['body']['status'] == 'failed') { +// $failures++; +// } elseif ($execution['body']['status'] == 'completed') { +// $executions++; +// } + +// $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', $headers, [ +// 'async' => false, +// ]); + +// $this->assertEquals(201, $execution['headers']['status-code']); +// $this->assertNotEmpty($execution['body']['$id']); +// $this->assertEquals($functionId, $execution['body']['functionId']); +// if ($execution['body']['status'] == 'failed') { +// $failures++; +// } elseif ($execution['body']['status'] == 'completed') { +// $executions++; +// } +// $executionTime += (int) ($execution['body']['duration'] * 1000); + +// $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', $headers, [ +// 'async' => true, +// ]); + +// sleep(10); + +// $execution = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $execution['body']['$id'], $headers); + +// if ($execution['body']['status'] == 'failed') { +// $failures++; +// } elseif ($execution['body']['status'] == 'completed') { +// $executions++; +// } +// $executionTime += (int) ($execution['body']['duration'] * 1000); + +// $data = array_merge($data, [ +// 'functionId' => $functionId, +// 'executionTime' => $executionTime, +// 'executions' => $executions, +// 'failures' => $failures, +// ]); + +// return $data; +// } + +// /** @depends testPrepareFunctionsStats */ +// #[Retry(count: 1)] +// public function testFunctionsStats(array $data): void +// { +// $headers = $data['headers']; +// $functionId = $data['functionId']; +// $executionTime = $data['executionTime']; +// $executions = $data['executions']; +// $failures = $data['failures']; + +// sleep(20); + +// $response = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/usage', $headers, [ +// 'range' => '30d' +// ]); + +// $this->assertEquals(200, $response['headers']['status-code']); +// $this->assertEquals(9, count($response['body'])); +// $this->assertEquals('30d', $response['body']['range']); +// $this->assertIsArray($response['body']['executionsTotal']); +// $this->assertIsArray($response['body']['executionsFailure']); +// $this->assertIsArray($response['body']['executionsSuccess']); +// $this->assertIsArray($response['body']['executionsTime']); +// $this->assertIsArray($response['body']['buildsTotal']); +// $this->assertIsArray($response['body']['buildsFailure']); +// $this->assertIsArray($response['body']['buildsSuccess']); +// $this->assertIsArray($response['body']['buildsTime']); +// $response = $response['body']; + +// $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); +// $this->validateDates($response['executionsTotal']); +// $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); +// $this->validateDates($response['executionsTime']); +// $this->assertEquals($failures, $response['executionsFailure'][array_key_last($response['executionsFailure'])]['value']); +// $this->validateDates($response['executionsFailure']); + +// $response = $this->client->call(Client::METHOD_GET, '/functions/usage', $headers, [ +// 'range' => '30d' +// ]); + +// $this->assertEquals(200, $response['headers']['status-code']); +// $this->assertEquals(9, count($response['body'])); +// $this->assertEquals($response['body']['range'], '30d'); +// $this->assertIsArray($response['body']['executionsTotal']); +// $this->assertIsArray($response['body']['executionsFailure']); +// $this->assertIsArray($response['body']['executionsSuccess']); +// $this->assertIsArray($response['body']['executionsTime']); +// $this->assertIsArray($response['body']['buildsTotal']); +// $this->assertIsArray($response['body']['buildsFailure']); +// $this->assertIsArray($response['body']['buildsSuccess']); +// $this->assertIsArray($response['body']['buildsTime']); +// $response = $response['body']; + +// $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); +// $this->validateDates($response['executionsTotal']); +// $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); +// $this->validateDates($response['executionsTime']); +// $this->assertGreaterThan(0, $response['buildsTime'][array_key_last($response['buildsTime'])]['value']); +// $this->validateDates($response['buildsTime']); +// $this->assertEquals($failures, $response['executionsFailure'][array_key_last($response['executionsFailure'])]['value']); +// $this->validateDates($response['executionsFailure']); +// } + +// protected function tearDown(): void +// { +// $this->usersCount = 0; +// $this->requestsCount = 0; +// $projectId = ''; +// $headers = []; +// } +// } diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 1bd4de501c..408b8c8fe7 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -109,6 +109,21 @@ trait ProjectCustom $this->assertEquals(201, $webhook['headers']['status-code']); $this->assertNotEmpty($webhook['body']); + $this->client->call(Client::METHOD_PATCH, '/projects/' . $project['body']['$id'] . '/smtp', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + 'x-appwrite-project' => 'console', + ], [ + 'enabled' => true, + 'senderEmail' => 'mailer@appwrite.io', + 'senderName' => 'Mailer', + 'host' => 'maildev', + 'port' => 1025, + 'username' => '', + 'password' => '', + ]); + $project = [ '$id' => $project['body']['$id'], 'name' => $project['body']['name'], diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index 291d55b221..e64cf2c4ca 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -346,7 +346,7 @@ trait AccountBase */ public function testGetAccountLogs($data): array { - sleep(10); + sleep(5); $session = $data['session'] ?? ''; $sessionId = $data['sessionId'] ?? ''; $userId = $data['id'] ?? ''; diff --git a/tests/e2e/Services/Account/AccountConsoleClientTest.php b/tests/e2e/Services/Account/AccountConsoleClientTest.php index b517d8c408..3d4445dcc9 100644 --- a/tests/e2e/Services/Account/AccountConsoleClientTest.php +++ b/tests/e2e/Services/Account/AccountConsoleClientTest.php @@ -15,85 +15,4 @@ class AccountConsoleClientTest extends Scope use AccountBase; use ProjectConsole; use SideClient; - - public function testCreateAccountWithInvite(): void - { - $email = uniqid() . 'user@localhost.test'; - $password = 'password'; - $name = 'User Name'; - - /** - * Test for FAILURE - */ - $response = $this->client->call(Client::METHOD_POST, '/account/invite', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ]), [ - 'userId' => ID::unique(), - 'email' => $email, - 'password' => $password, - 'name' => $name, - 'code' => 'Invalid Code' - ]); - - $this->assertEquals($response['headers']['status-code'], 401); - $this->assertEquals($response['body']['type'], Exception::USER_INVALID_CODE); - - $response = $this->client->call(Client::METHOD_POST, '/account/invite', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ]), [ - 'userId' => ID::unique(), - 'email' => $email, - 'password' => $password, - 'name' => $name, - ]); - - $this->assertEquals($response['headers']['status-code'], 401); - $this->assertEquals($response['body']['type'], Exception::USER_INVALID_CODE); - - /** - * Test for SUCCESS - */ - $response = $this->client->call(Client::METHOD_POST, '/account/invite', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ]), [ - 'userId' => ID::unique(), - 'email' => $email, - 'password' => $password, - 'name' => $name, - 'code' => 'code-zero' - ]); - - $this->assertEquals(201, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']); - $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); - $this->assertEquals($response['body']['email'], $email); - $this->assertEquals($response['body']['name'], $name); - - $email = uniqid() . 'user@localhost.test'; - $response = $this->client->call(Client::METHOD_POST, '/account/invite', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ]), [ - 'userId' => ID::unique(), - 'email' => $email, - 'password' => $password, - 'name' => $name, - 'code' => 'code-one' - ]); - - $this->assertEquals(201, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']); - $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); - $this->assertEquals($response['body']['email'], $email); - $this->assertEquals($response['body']['name'], $name); - } } diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index d225496a65..1441ab7f98 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -21,32 +21,6 @@ class AccountCustomClientTest extends Scope use ProjectCustom; use SideClient; - public function testCreateAccountWithInvite(): void - { - $email = uniqid() . 'user@localhost.test'; - $password = 'password'; - $name = 'User Name'; - - /** - * Test for FAILURE - * Make sure the invite endpoint is only accessible through the console project. - */ - $response = $this->client->call(Client::METHOD_POST, '/account/invite', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ]), [ - 'userId' => ID::unique(), - 'email' => $email, - 'password' => $password, - 'name' => $name, - 'code' => 'Invalid Code' - ]); - - $this->assertEquals($response['headers']['status-code'], 401); - $this->assertEquals($response['body']['type'], Exception::GENERAL_ACCESS_FORBIDDEN); - } - /** * @depends testCreateAccountSession */ @@ -408,6 +382,7 @@ class AccountCustomClientTest extends Scope ])); $this->assertEquals($response['headers']['status-code'], 200); $this->assertArrayHasKey('accessedAt', $response['body']); + $this->assertNotEmpty($response['body']['accessedAt']); /** diff --git a/tests/e2e/Services/Avatars/AvatarsBase.php b/tests/e2e/Services/Avatars/AvatarsBase.php index e2ddc1a863..1652e01514 100644 --- a/tests/e2e/Services/Avatars/AvatarsBase.php +++ b/tests/e2e/Services/Avatars/AvatarsBase.php @@ -287,26 +287,6 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); - // $response = $this->client->call(Client::METHOD_GET, '/avatars/favicon', [ - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], [ - // 'url' => 'https://www.bbc.com/', - // ]); - - // $this->assertEquals(200, $response['headers']['status-code']); - // $this->assertEquals('image/png', $response['headers']['content-type']); - // $this->assertNotEmpty($response['body']); - - // $response = $this->client->call(Client::METHOD_GET, '/avatars/favicon', [ - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], [ - // 'url' => 'https://edition.cnn.com/', - // ]); - - // $this->assertEquals(200, $response['headers']['status-code']); - // $this->assertEquals('image/x-icon', $response['headers']['content-type']); - // $this->assertNotEmpty($response['body']); - /** * Test for FAILURE */ @@ -326,6 +306,14 @@ trait AvatarsBase $this->assertEquals(404, $response['headers']['status-code']); + $response = $this->client->call(Client::METHOD_GET, '/avatars/favicon', [ + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'url' => 'http://localhost', + ]); + + $this->assertEquals(404, $response['headers']['status-code']); + return []; } diff --git a/tests/e2e/Services/Console/ConsoleConsoleClientTest.php b/tests/e2e/Services/Console/ConsoleConsoleClientTest.php index 3c1e973821..ca9287cdca 100644 --- a/tests/e2e/Services/Console/ConsoleConsoleClientTest.php +++ b/tests/e2e/Services/Console/ConsoleConsoleClientTest.php @@ -21,13 +21,16 @@ class ConsoleConsoleClientTest extends Scope $response = $this->client->call(Client::METHOD_GET, '/console/variables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); + ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertCount(4, $response['body']); + $this->assertCount(7, $response['body']); $this->assertIsString($response['body']['_APP_DOMAIN_TARGET']); $this->assertIsInt($response['body']['_APP_STORAGE_LIMIT']); $this->assertIsInt($response['body']['_APP_FUNCTIONS_SIZE_LIMIT']); $this->assertIsString($response['body']['_APP_DOMAIN_TARGET']); + $this->assertIsBool($response['body']['_APP_DOMAIN_ENABLED']); + $this->assertIsBool($response['body']['_APP_VCS_ENABLED']); + $this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']); } } diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index c2c1c70bd6..88a7f99314 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -344,6 +344,63 @@ trait DatabasesBase $this->assertEquals(400, $response['headers']['status-code']); } + public function testUpdateAttributeEnum(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database 2' + ]); + + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Players', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + // Create enum attribute + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/collections/' . $players['body']['$id'] . '/attributes/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'position', + 'elements' => ['goalkeeper', 'defender', 'midfielder', 'forward'], + 'required' => true, + 'array' => false, + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals($attribute['body']['key'], 'position'); + $this->assertEquals($attribute['body']['elements'], ['goalkeeper', 'defender', 'midfielder', 'forward']); + + \sleep(2); + + // Update enum attribute + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/collections/' . $players['body']['$id'] . '/attributes/enum/' . $attribute['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'elements' => ['goalkeeper', 'defender', 'midfielder', 'forward', 'coach'], + 'required' => true, + 'default' => null + ]); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals($attribute['body']['elements'], ['goalkeeper', 'defender', 'midfielder', 'forward', 'coach']); + } + /** * @depends testCreateAttributes */ @@ -1284,62 +1341,6 @@ trait DatabasesBase return ['documents' => $documents['body']['documents'], 'databaseId' => $databaseId]; } - public function testCreateCollectionAlias(): array - { - // Create default database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'databaseId' => ID::custom('default'), - 'name' => 'Default' - ]); - - $this->assertNotEmpty($database['body']['$id']); - $this->assertEquals(201, $database['headers']['status-code']); - - /** - * Test for SUCCESS - */ - - $movies = $this->client->call(Client::METHOD_POST, '/database/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Movies', - 'permissions' => [], - 'documentSecurity' => true, - ]); - - $this->assertEquals(201, $movies['headers']['status-code']); - $this->assertEquals('Movies', $movies['body']['name']); - - return ['moviesId' => $movies['body']['$id']]; - } - - /** - * @depends testCreateCollectionAlias - */ - public function testListDocumentsAlias(array $data): array - { - /** - * Test for SUCCESS - */ - - $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(0, $documents['body']['total']); - - return []; - } - /** * @depends testListDocuments */ @@ -2862,8 +2863,6 @@ trait DatabasesBase $collectionId = $collection['body']['$id']; - sleep(2); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -2877,8 +2876,7 @@ trait DatabasesBase $this->assertEquals(202, $attribute['headers']['status-code'], 202); $this->assertEquals('attribute', $attribute['body']['key']); - // wait for db to add attribute - sleep(2); + \sleep(2); $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -2893,8 +2891,7 @@ trait DatabasesBase $this->assertEquals(202, $index['headers']['status-code']); $this->assertEquals('key_attribute', $index['body']['key']); - // wait for db to add attribute - sleep(2); + \sleep(2); $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2993,7 +2990,7 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // Current user has no collection permissions and document permissions are disabled + // other2 has no collection permissions and document permissions are disabled $this->assertEquals(404, $document3GetWithDocumentRead['headers']['status-code']); $documentsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ @@ -3003,8 +3000,8 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // Current user has no collection permissions and document permissions are disabled - $this->assertEquals(404, $documentsUser2['headers']['status-code']); + // other2 has no collection permissions and document permissions are disabled + $this->assertEquals(401, $documentsUser2['headers']['status-code']); // Enable document permissions $collection = $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $collectionId, [ diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 17059adf88..04ac00c263 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -29,6 +29,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertTrue($database['body']['enabled']); $databaseId = $database['body']['$id']; + /** * Test for SUCCESS */ @@ -51,7 +52,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals($movies['body']['name'], 'Movies'); /** - * Test When database is disabled but can still create collections + * Test when database is disabled but can still create collections */ $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, array_merge([ 'content-type' => 'application/json', @@ -78,6 +79,17 @@ class DatabasesConsoleClientTest extends Scope 'documentSecurity' => true, ]); + /** + * Test when collection is disabled but can still modify collections + */ + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $movies['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'name' => 'Movies', + 'enabled' => false, + ]); + $this->assertEquals(201, $tvShows['headers']['status-code']); $this->assertEquals($tvShows['body']['name'], 'TvShows'); @@ -87,11 +99,12 @@ class DatabasesConsoleClientTest extends Scope /** * @depends testCreateCollection * @param array $data + * @throws \Exception */ public function testListCollection(array $data) { /** - * Test When database is disabled but can still call list collections + * Test when database is disabled but can still call list collections */ $databaseId = $data['databaseId']; @@ -108,6 +121,7 @@ class DatabasesConsoleClientTest extends Scope /** * @depends testCreateCollection * @param array $data + * @throws \Exception */ public function testGetCollection(array $data) { @@ -115,7 +129,7 @@ class DatabasesConsoleClientTest extends Scope $moviesCollectionId = $data['moviesId']; /** - * Test When database is disabled but can still call get collection + * Test when database and collection are disabled but can still call get collection */ $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', @@ -125,12 +139,14 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $collection['headers']['status-code']); $this->assertEquals('Movies', $collection['body']['name']); $this->assertEquals($moviesCollectionId, $collection['body']['$id']); - $this->assertTrue($collection['body']['enabled']); + $this->assertFalse($collection['body']['enabled']); } /** * @depends testCreateCollection * @param array $data + * @throws \Exception + * @throws \Exception */ public function testUpdateCollection(array $data) { @@ -138,7 +154,7 @@ class DatabasesConsoleClientTest extends Scope $moviesCollectionId = $data['moviesId']; /** - * Test When database is disabled but can still call update collection + * Test When database and collection are disabled but can still call update collection */ $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', @@ -157,6 +173,8 @@ class DatabasesConsoleClientTest extends Scope /** * @depends testCreateCollection * @param array $data + * @throws \Exception + * @throws \Exception */ public function testDeleteCollection(array $data) { @@ -164,7 +182,7 @@ class DatabasesConsoleClientTest extends Scope $tvShowsId = $data['tvShowsId']; /** - * Test When database is disabled but can still call Delete collection + * Test when database and collection are disabled but can still call delete collection */ $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $tvShowsId, array_merge([ 'content-type' => 'application/json', @@ -175,44 +193,6 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals($response['body'], ""); } - /** - * @depends testCreateCollection - */ - public function testGetDatabaseUsage(array $data) - { - $databaseId = $data['databaseId']; - /** - * Test for FAILURE - */ - - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders()), [ - 'range' => '32h' - ]); - - $this->assertEquals(400, $response['headers']['status-code']); - - /** - * Test for SUCCESS - */ - - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders()), [ - 'range' => '24h' - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(count($response['body']), 3); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['documentsTotal']); - $this->assertIsArray($response['body']['collectionsTotal']); - } - - /** * @depends testCreateCollection */ @@ -250,10 +230,15 @@ class DatabasesConsoleClientTest extends Scope ], $this->getHeaders()), [ 'range' => '24h' ]); + $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(count($response['body']), 2); + $this->assertEquals(count($response['body']), 6); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['documentsTotal']); + $this->assertIsArray($response['body']['documentsCount']); + $this->assertIsArray($response['body']['documentsCreate']); + $this->assertIsArray($response['body']['documentsRead']); + $this->assertIsArray($response['body']['documentsUpdate']); + $this->assertIsArray($response['body']['documentsDelete']); } /** diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index b0ab884a07..743df9e53a 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -316,4 +316,420 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); $this->assertEquals('restrict', $collection1RelationAttribute['onDelete']); } + + public function testUpdateWithoutRelationPermission(): void + { + $userId = $this->getUser()['$id']; + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => ID::unique(), + ]); + + $databaseId = $database['body']['$id']; + + // Creating collection 1 + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection1'), + 'name' => ID::custom('collection1'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Creating collection 2 + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection2'), + 'name' => ID::custom('collection2'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::user($userId)), + ] + ]); + + $collection3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection3'), + 'name' => ID::custom('collection3'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + $collection4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection4'), + 'name' => ID::custom('collection4'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::user($userId)), + ] + ]); + + $collection5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection5'), + 'name' => ID::custom('collection5'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Creating one to one relationship from collection 1 to colletion 2 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $collection2['body']['$id'] + ]); + + // Creating one to one relationship from collection 2 to colletion 3 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2['body']['$id'] . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection3['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $collection3['body']['$id'] + ]); + + // Creating one to one relationship from collection 3 to colletion 4 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection3['body']['$id'] . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection4['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $collection4['body']['$id'] + ]); + + // Creating one to one relationship from collection 4 to colletion 5 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection4['body']['$id'] . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection5['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $collection5['body']['$id'] + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Title", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection3['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection4['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection5['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + \sleep(2); + // Creating parent document with a child reference to test the permissions + $parentDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::custom($collection1['body']['$id']), + 'data' => [ + 'Title' => 'Captain America', + $collection2['body']['$id'] => [ + '$id' => ID::custom($collection2['body']['$id']), + 'Rating' => '10', + $collection3['body']['$id'] => [ + '$id' => ID::custom($collection3['body']['$id']), + 'Rating' => '10', + $collection4['body']['$id'] => [ + '$id' => ID::custom($collection4['body']['$id']), + 'Rating' => '10', + $collection5['body']['$id'] => [ + '$id' => ID::custom($collection5['body']['$id']), + 'Rating' => '10' + ] + ] + ] + ] + ] + ]); + + $this->assertEquals(201, $parentDocument['headers']['status-code']); + // This is the point of the test. We should not need any authorization permission to update the document with same data. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/documents/' . $collection1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::custom($collection1['body']['$id']), + 'data' => [ + 'Title' => 'Captain America', + $collection2['body']['$id'] => [ + '$id' => $collection2['body']['$id'], + 'Rating' => '10', + $collection3['body']['$id'] => [ + '$id' => $collection3['body']['$id'], + 'Rating' => '10', + $collection4['body']['$id'] => [ + '$id' => $collection4['body']['$id'], + 'Rating' => '10', + $collection5['body']['$id'] => [ + '$id' => $collection5['body']['$id'], + 'Rating' => '10' + ] + ] + ] + ] + ] + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals($parentDocument['body'], $response['body']); + + // Giving update permission of collection 3 to user. + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/collection3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection3'), + 'name' => ID::custom('collection3'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/documents/' . $collection1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $collection2['body']['$id'] => [ + '$id' => ID::custom($collection2['body']['$id']), + 'Rating' => '10', + $collection3['body']['$id'] => [ + '$id' => ID::custom($collection3['body']['$id']), + 'Rating' => '11', + $collection4['body']['$id'] => [ + '$id' => ID::custom($collection4['body']['$id']), + 'Rating' => '10', + $collection5['body']['$id'] => [ + '$id' => ID::custom($collection5['body']['$id']), + 'Rating' => '11' + ] + ] + ] + ] + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(11, $response['body'][$collection2['body']['$id']]['collection3']['Rating']); + + // We should not be allowed to update the document as we do not have permission for collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/documents/' . $collection1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $collection2['body']['$id'] => [ + '$id' => ID::custom($collection2['body']['$id']), + 'Rating' => '11', + $collection3['body']['$id'] => null, + ] + ] + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + // We should not be allowed to update the document as we do not have permission for collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection2['body']['$id'] . '/documents/' . $collection2['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Rating' => '11', + ] + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + // Removing update permission from collection 3. + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/collection3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection3'), + 'name' => ID::custom('collection3'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Giving update permission to collection 2. + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/collection2', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('collection2'), + 'name' => ID::custom('collection2'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Creating collection 3 new document + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection3['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::custom('collection3Doc1'), + 'data' => [ + 'Rating' => '20' + ] + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + + // We should be allowed to link a new document from collection 3 to collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/documents/' . $collection1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $collection2['body']['$id'] => [ + '$id' => ID::custom($collection2['body']['$id']), + $collection3['body']['$id'] => 'collection3Doc1', + ] + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + + // We should be allowed to link and create a new document from collection 3 to collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/documents/' . $collection1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $collection2['body']['$id'] => [ + '$id' => ID::custom($collection2['body']['$id']), + $collection3['body']['$id'] => [ + '$id' => ID::custom('collection3Doc2') + ], + ] + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + } } diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index 5e734fbcb2..648a4de800 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -593,6 +593,110 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($collection['body']['enabled']); } + /** + * @depends testListCollections + */ + public function testCreateEncryptedAttribute(array $data): void + { + + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + + // Create collection + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Encrypted Actors Data', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $actors['headers']['status-code']); + $this->assertEquals($actors['body']['name'], 'Encrypted Actors Data'); + + /** + * Test for creating encrypted attributes + */ + + $attributesPath = '/databases/' . $databaseId . '/collections/' . $actors['body']['$id'] . '/attributes'; + + $firstName = $this->client->call(Client::METHOD_POST, $attributesPath . '/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'firstName', + 'size' => 256, + 'required' => true, + ]); + + $lastName = $this->client->call(Client::METHOD_POST, $attributesPath . '/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'lastName', + 'size' => 256, + 'required' => true, + 'encrypt' => true, + ]); + + + /** + * Check status of every attribute + */ + $this->assertEquals(202, $firstName['headers']['status-code']); + $this->assertEquals('firstName', $firstName['body']['key']); + $this->assertEquals('string', $firstName['body']['type']); + + $this->assertEquals(202, $lastName['headers']['status-code']); + $this->assertEquals('lastName', $lastName['body']['key']); + $this->assertEquals('string', $lastName['body']['type']); + + // Wait for database worker to finish creating attributes + sleep(2); + + // Creating document to ensure cache is purged on schema change + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $actors['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'firstName' => 'Jonah', + 'lastName' => 'Jameson', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + // Check document to ensure cache is purged on schema change + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $actors['body']['$id'] . '/documents/' . $document['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Jonah', $document['body']['firstName']); + $this->assertEquals('Jameson', $document['body']['lastName']); + } + public function testDeleteAttribute(): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php index dcbf3e4bff..8377b9c803 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php @@ -176,7 +176,7 @@ class DatabasesPermissionsTeamTest extends Scope if ($success) { $this->assertCount(1, $documents['body']['documents']); } else { - $this->assertEquals(404, $documents['headers']['status-code']); + $this->assertEquals(401, $documents['headers']['status-code']); } } diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index e28bdd233f..b458a4316b 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -24,6 +24,7 @@ class FunctionsConsoleClientTest extends Scope 'name' => 'Test', 'execute' => [Role::user($this->getUser()['$id'])->toString()], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'events' => [ 'users.*.create', 'users.*.delete', @@ -41,7 +42,8 @@ class FunctionsConsoleClientTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test Failure', 'execute' => ['some-random-string'], - 'runtime' => 'php-8.0' + 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', ]); $this->assertEquals(400, $response['headers']['status-code']); @@ -54,7 +56,7 @@ class FunctionsConsoleClientTest extends Scope /** * @depends testCreateFunction */ - public function testGetFunctionUsage(array $data) + public function testGetCollectionUsage(array $data) { /** * Test for FAILURE @@ -90,15 +92,16 @@ class FunctionsConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 8); + $this->assertEquals(count($response['body']), 9); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['deployments']); - $this->assertIsArray($response['body']['deploymentsStorage']); - $this->assertIsArray($response['body']['builds']); - $this->assertIsArray($response['body']['buildsStorage']); - $this->assertIsArray($response['body']['buildsCompute']); - $this->assertIsArray($response['body']['executions']); - $this->assertIsArray($response['body']['executionsCompute']); + $this->assertIsArray($response['body']['executionsTotal']); + $this->assertIsArray($response['body']['executionsFailure']); + $this->assertIsArray($response['body']['executionsSuccess']); + $this->assertIsArray($response['body']['executionsTime']); + $this->assertIsArray($response['body']['buildsTotal']); + $this->assertIsArray($response['body']['buildsFailure']); + $this->assertIsArray($response['body']['buildsSuccess']); + $this->assertIsArray($response['body']['buildsTime']); } /** diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index 713814e17f..c49608222d 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -54,6 +54,7 @@ class FunctionsCustomClientTest extends Scope 'name' => 'Test', 'execute' => [Role::user($this->getUser()['$id'])->toString()], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'events' => [ 'users.*.create', 'users.*.delete', @@ -114,8 +115,25 @@ class FunctionsCustomClientTest extends Scope $this->assertEquals(202, $deployment['headers']['status-code']); - // Wait for deployment to be built. - sleep(20); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['body']['status']); $function = $this->client->call(Client::METHOD_PATCH, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ 'content-type' => 'application/json', @@ -172,6 +190,7 @@ class FunctionsCustomClientTest extends Scope 'name' => 'Test', 'execute' => [Role::any()->toString()], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'timeout' => 10, ]); @@ -227,10 +246,25 @@ class FunctionsCustomClientTest extends Scope $deploymentId = $deployment['body']['$id'] ?? ''; - // Wait for deployment to be built. - sleep(20); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); - $this->assertEquals(202, $deployment['headers']['status-code']); + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['body']['status']); $function = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, [ 'content-type' => 'application/json', @@ -244,25 +278,14 @@ class FunctionsCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), [ - 'data' => 'foobar', - 'async' => true + 'body' => 'foobar', + 'async' => false ]); - $this->assertEquals(202, $execution['headers']['status-code']); - - $executionId = $execution['body']['$id'] ?? ''; - - sleep(20); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $apikey, - ]); - - $output = json_decode($executions['body']['response'], true); - $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertEquals('completed', $executions['body']['status']); + $output = json_decode($execution['body']['responseBody'], true); + $this->assertEquals(201, $execution['headers']['status-code']); + $this->assertEquals(200, $execution['body']['responseStatusCode']); + $this->assertEquals('completed', $execution['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); $this->assertEquals('Test', $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); @@ -270,12 +293,35 @@ class FunctionsCustomClientTest extends Scope $this->assertEquals('PHP', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); $this->assertEquals('8.0', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); $this->assertEquals($this->getUser()['$id'], $output['APPWRITE_FUNCTION_USER_ID']); $this->assertNotEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($projectId, $output['APPWRITE_FUNCTION_PROJECT_ID']); + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), [ + 'body' => 'foobar', + 'async' => true + ]); + + $this->assertEquals(202, $execution['headers']['status-code']); + + $executionId = $execution['body']['$id'] ?? ''; + + sleep(5); + + $execution = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $apikey, + ]); + + $this->assertEmpty($execution['body']['responseBody']); + $this->assertEquals(200, $execution['headers']['status-code']); + $this->assertEquals(200, $execution['body']['responseStatusCode']); + return [ 'functionId' => $functionId ]; @@ -298,6 +344,7 @@ class FunctionsCustomClientTest extends Scope 'name' => 'Test', 'execute' => [Role::any()->toString()], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'vars' => [ 'funcKey1' => 'funcValue1', 'funcKey2' => 'funcValue2', @@ -326,10 +373,25 @@ class FunctionsCustomClientTest extends Scope $deploymentId = $deployment['body']['$id'] ?? ''; - // Wait for deployment to be built. - sleep(20); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); - $this->assertEquals(202, $deployment['headers']['status-code']); + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['body']['status']); // Why do we have to do this? $function = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, [ @@ -362,6 +424,7 @@ class FunctionsCustomClientTest extends Scope 'name' => 'Test', 'execute' => [], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'timeout' => 10, ]); @@ -390,13 +453,10 @@ class FunctionsCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), [ - 'data' => 'foobar', - 'async' => true + 'data' => 'foobar' ]); - $this->assertEquals(202, $execution['headers']['status-code']); - - sleep(20); + $this->assertEquals(201, $execution['headers']['status-code']); $base = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', [ 'content-type' => 'application/json', @@ -405,7 +465,7 @@ class FunctionsCustomClientTest extends Scope ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertCount(2, $base['body']['executions']); + $this->assertCount(3, $base['body']['executions']); $this->assertEquals('completed', $base['body']['executions'][0]['status']); $this->assertEquals('completed', $base['body']['executions'][1]['status']); @@ -429,7 +489,7 @@ class FunctionsCustomClientTest extends Scope ]); $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertCount(1, $executions['body']['executions']); + $this->assertCount(2, $executions['body']['executions']); $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', [ 'content-type' => 'application/json', @@ -440,7 +500,7 @@ class FunctionsCustomClientTest extends Scope ]); $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertCount(2, $executions['body']['executions']); + $this->assertCount(3, $executions['body']['executions']); $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', [ 'content-type' => 'application/json', @@ -461,7 +521,7 @@ class FunctionsCustomClientTest extends Scope 'queries' => [ 'cursorAfter("' . $base['body']['executions'][0]['$id'] . '")' ], ]); - $this->assertCount(1, $executions['body']['executions']); + $this->assertCount(2, $executions['body']['executions']); $this->assertEquals($base['body']['executions'][1]['$id'], $executions['body']['executions'][0]['$id']); $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', [ @@ -500,6 +560,7 @@ class FunctionsCustomClientTest extends Scope 'name' => 'Test', 'execute' => [Role::any()->toString()], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'timeout' => 10, ]); @@ -557,14 +618,31 @@ class FunctionsCustomClientTest extends Scope $this->assertEquals(202, $deployment['headers']['status-code']); - // Wait for deployment to be built. - sleep(20); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['body']['status']); $function = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $apikey, - ], []); + ]); $this->assertEquals(200, $function['headers']['status-code']); @@ -572,13 +650,14 @@ class FunctionsCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), [ - 'data' => 'foobar', + 'body' => 'foobar', // Testing default value, should be 'async' => false ]); - $output = json_decode($execution['body']['response'], true); + $output = json_decode($execution['body']['responseBody'], true); $this->assertEquals(201, $execution['headers']['status-code']); $this->assertEquals('completed', $execution['body']['status']); + $this->assertEquals(200, $execution['body']['responseStatusCode']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); $this->assertEquals('Test', $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); @@ -586,14 +665,13 @@ class FunctionsCustomClientTest extends Scope $this->assertEquals('PHP', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); $this->assertEquals('8.0', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); $this->assertEquals($this->getUser()['$id'], $output['APPWRITE_FUNCTION_USER_ID']); $this->assertNotEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($projectId, $output['APPWRITE_FUNCTION_PROJECT_ID']); // Client should never see logs and errors - $this->assertEmpty($execution['body']['stdout']); - $this->assertEmpty($execution['body']['stderr']); + $this->assertEmpty($execution['body']['logs']); + $this->assertEmpty($execution['body']['errors']); // Cleanup : Delete function $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index ab931f14e4..052c3ca936 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -30,6 +30,7 @@ class FunctionsCustomServerTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test', 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'events' => [ 'users.*.create', 'users.*.delete', @@ -188,6 +189,7 @@ class FunctionsCustomServerTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test 2', 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'events' => [ 'users.*.create', 'users.*.delete', @@ -322,7 +324,9 @@ class FunctionsCustomServerTest extends Scope 'users.*.update.email', ], 'schedule' => '0 0 1 1 *', - 'timeout' => 5, + 'timeout' => 15, + 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', ]); $this->assertEquals(200, $response1['headers']['status-code']); @@ -337,7 +341,7 @@ class FunctionsCustomServerTest extends Scope 'users.*.update.email', ], $response1['body']['events']); $this->assertEquals('0 0 1 1 *', $response1['body']['schedule']); - $this->assertEquals(5, $response1['body']['timeout']); + $this->assertEquals(15, $response1['body']['timeout']); /** * Test for FAILURE @@ -362,7 +366,6 @@ class FunctionsCustomServerTest extends Scope 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'entrypoint' => 'index.php', 'code' => new CURLFile($code, 'application/x-gzip', \basename($code)), 'activate' => true ]); @@ -374,8 +377,26 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(true, (new DatetimeValidator())->isValid($deployment['body']['$createdAt'])); $this->assertEquals('index.php', $deployment['body']['entrypoint']); - // Wait for deployment to build. - sleep(60); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals(200, $deployment['headers']['status-code']); + $this->assertEquals('ready', $deployment['body']['status']); return array_merge($data, ['deploymentId' => $deploymentId]); } @@ -572,10 +593,9 @@ class FunctionsCustomServerTest extends Scope ], $this->getHeaders())); $this->assertEquals(200, $function['headers']['status-code']); - $this->assertEquals(0, $function['body']['buildTime']); + $this->assertGreaterThan(0, $function['body']['buildTime']); $this->assertNotEmpty($function['body']['status']); - $this->assertNotEmpty($function['body']['buildStdout']); - $this->assertArrayHasKey('buildStderr', $function['body']); + $this->assertNotEmpty($function['body']['buildLogs']); /** * Test for FAILURE @@ -602,50 +622,28 @@ class FunctionsCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'async' => true, + 'async' => false, ]); $executionId = $execution['body']['$id'] ?? ''; - $this->assertEquals(202, $execution['headers']['status-code']); - $this->assertNotEmpty($execution['body']['$id']); - $this->assertNotEmpty($execution['body']['functionId']); - $this->assertEquals(true, (new DatetimeValidator())->isValid($execution['body']['$createdAt'])); - $this->assertEquals($data['functionId'], $execution['body']['functionId']); - $this->assertEquals('waiting', $execution['body']['status']); - $this->assertEquals(0, $execution['body']['statusCode']); - $this->assertEquals('', $execution['body']['response']); - $this->assertEquals('', $execution['body']['stderr']); - $this->assertEquals(0, $execution['body']['duration']); - - sleep(10); - - $execution = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions/' . $executionId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - + $this->assertEquals(201, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); $this->assertNotEmpty($execution['body']['functionId']); $this->assertEquals(true, (new DatetimeValidator())->isValid($execution['body']['$createdAt'])); $this->assertEquals($data['functionId'], $execution['body']['functionId']); $this->assertEquals('completed', $execution['body']['status']); - $this->assertEquals(200, $execution['body']['statusCode']); - $this->assertStringContainsString($execution['body']['functionId'], $execution['body']['response']); - $this->assertStringContainsString($data['deploymentId'], $execution['body']['response']); - $this->assertStringContainsString('Test1', $execution['body']['response']); - $this->assertStringContainsString('http', $execution['body']['response']); - $this->assertStringContainsString('PHP', $execution['body']['response']); - $this->assertStringContainsString('8.0', $execution['body']['response']); - $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars - $this->assertEquals('', $execution['body']['stderr']); - $this->assertLessThan(3, $execution['body']['duration']); - - /** - * Test for FAILURE - */ - - sleep(20); + $this->assertEquals(200, $execution['body']['responseStatusCode']); + $this->assertStringContainsString($execution['body']['functionId'], $execution['body']['responseBody']); + $this->assertStringContainsString($data['deploymentId'], $execution['body']['responseBody']); + $this->assertStringContainsString('Test1', $execution['body']['responseBody']); + $this->assertStringContainsString('http', $execution['body']['responseBody']); + $this->assertStringContainsString('PHP', $execution['body']['responseBody']); + $this->assertStringContainsString('8.0', $execution['body']['responseBody']); + // $this->assertStringContainsString('êä', $execution['body']['responseBody']); // tests unknown utf-8 chars + $this->assertEquals('', $execution['body']['errors']); + $this->assertEquals('', $execution['body']['logs']); + $this->assertLessThan(10, $execution['body']['duration']); return array_merge($data, ['executionId' => $executionId]); } @@ -749,13 +747,13 @@ class FunctionsCustomServerTest extends Scope ]); $this->assertEquals(201, $execution['headers']['status-code']); - $this->assertEquals('completed', $execution['body']['status']); - $this->assertStringContainsString('Test1', $execution['body']['response']); - $this->assertStringContainsString('http', $execution['body']['response']); - $this->assertStringContainsString('PHP', $execution['body']['response']); - $this->assertStringContainsString('8.0', $execution['body']['response']); - $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars + $this->assertEquals(200, $execution['body']['responseStatusCode']); + $this->assertStringContainsString('Test1', $execution['body']['responseBody']); + $this->assertStringContainsString('http', $execution['body']['responseBody']); + $this->assertStringContainsString('PHP', $execution['body']['responseBody']); + $this->assertStringContainsString('8.0', $execution['body']['responseBody']); + // $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars $this->assertLessThan(1.500, $execution['body']['duration']); return $data; @@ -854,7 +852,7 @@ class FunctionsCustomServerTest extends Scope { $name = 'php-8.0'; $entrypoint = 'index.php'; - $timeout = 2; + $timeout = 15; $folder = 'timeout'; $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); @@ -866,6 +864,7 @@ class FunctionsCustomServerTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test ' . $name, 'runtime' => $name, + 'entrypoint' => $entrypoint, 'events' => [], 'timeout' => $timeout, ]); @@ -883,10 +882,29 @@ class FunctionsCustomServerTest extends Scope 'activate' => true, ]); + $deploymentId = $deployment['body']['$id'] ?? ''; + $this->assertEquals(202, $deployment['headers']['status-code']); - // Allow build step to run - sleep(40); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['body']['status']); $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', @@ -913,11 +931,12 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); $this->assertEquals($executions['body']['executions'][0]['status'], 'failed'); - $this->assertEquals($executions['body']['executions'][0]['statusCode'], 500); + $this->assertEquals($executions['body']['executions'][0]['responseStatusCode'], 500); $this->assertGreaterThan(2, $executions['body']['executions'][0]['duration']); - $this->assertLessThan(6, $executions['body']['executions'][0]['duration']); - $this->assertEquals($executions['body']['executions'][0]['response'], ''); - $this->assertEquals($executions['body']['executions'][0]['stderr'], 'An internal curl error has occurred within the executor! Error Msg: Operation timed out'); + $this->assertLessThan(20, $executions['body']['executions'][0]['duration']); + $this->assertEquals($executions['body']['executions'][0]['responseBody'], ''); + $this->assertEquals($executions['body']['executions'][0]['logs'], ''); + $this->assertStringContainsString('timed out', $executions['body']['executions'][0]['errors']); // Cleanup : Delete function $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ @@ -930,14 +949,33 @@ class FunctionsCustomServerTest extends Scope } /** + * + * @return array + */ + public function provideCustomExecutions(): array + { + return [ + [ 'folder' => 'php-fn', 'name' => 'php-8.0', 'entrypoint' => 'index.php', 'runtimeName' => 'PHP', 'runtimeVersion' => '8.0' ], + [ 'folder' => 'node', 'name' => 'node-18.0', 'entrypoint' => 'index.js', 'runtimeName' => 'Node.js', 'runtimeVersion' => '18.0' ], + [ 'folder' => 'python', 'name' => 'python-3.9', 'entrypoint' => 'main.py', 'runtimeName' => 'Python', 'runtimeVersion' => '3.9' ], + [ 'folder' => 'ruby', 'name' => 'ruby-3.1', 'entrypoint' => 'main.rb', 'runtimeName' => 'Ruby', 'runtimeVersion' => '3.1' ], + // Swift and Dart disabled as it's very slow. + // [ 'folder' => 'dart', 'name' => 'dart-2.15', 'entrypoint' => 'main.dart', 'runtimeName' => 'Dart', 'runtimeVersion' => '2.15' ], + // [ 'folder' => 'swift', 'name' => 'swift-5.5', 'entrypoint' => 'index.swift', 'runtimeName' => 'Swift', 'runtimeVersion' => '5.5' ], + ]; + } + + /** + * @param string $folder + * @param string $name + * @param string $entrypoint + * + * @dataProvider provideCustomExecutions * @depends testTimeout */ - public function testCreateCustomPHPExecution() + public function testCreateCustomExecution(string $folder, string $name, string $entrypoint, string $runtimeName, string $runtimeVersion) { - $name = 'php-8.0'; - $entrypoint = 'index.php'; $timeout = 2; - $folder = 'php-fn'; $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); @@ -948,6 +986,7 @@ class FunctionsCustomServerTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test ' . $name, 'runtime' => $name, + 'entrypoint' => $entrypoint, 'events' => [], 'timeout' => $timeout, ]); @@ -956,6 +995,16 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); + $variable = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/variables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'key' => 'CUSTOM_VARIABLE', + 'value' => 'variable', + ]); + + $this->assertEquals(201, $variable['headers']['status-code']); + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], @@ -968,8 +1017,23 @@ class FunctionsCustomServerTest extends Scope $deploymentId = $deployment['body']['$id'] ?? ''; $this->assertEquals(202, $deployment['headers']['status-code']); - // Allow build step to run - sleep(20); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } $deployment = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', @@ -982,266 +1046,30 @@ class FunctionsCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'data' => 'foobar', - 'async' => true + 'body' => 'foobar', + 'async' => false ]); $executionId = $execution['body']['$id'] ?? ''; + $output = json_decode($execution['body']['responseBody'], true); - $this->assertEquals(202, $execution['headers']['status-code']); - - $executionId = $execution['body']['$id'] ?? ''; - - sleep(20); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $output = json_decode($executions['body']['response'], true); - - $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertEquals('completed', $executions['body']['status']); + $this->assertEquals(201, $execution['headers']['status-code']); + $this->assertEquals('completed', $execution['body']['status']); + $this->assertEquals(200, $execution['body']['responseStatusCode']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); - $this->assertEquals('PHP', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); - $this->assertEquals('8.0', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); + $this->assertEquals($runtimeName, $output['APPWRITE_FUNCTION_RUNTIME_NAME']); + $this->assertEquals($runtimeVersion, $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); - $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); - $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); - $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - $this->assertStringContainsString('Amazing Function Log', $executions['body']['stdout']); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals($executions['headers']['status-code'], 200); - $this->assertEquals($executions['body']['total'], 1); - $this->assertIsArray($executions['body']['executions']); - $this->assertCount(1, $executions['body']['executions']); - $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); - $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); - - // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'], - ], []); - - $this->assertEquals(204, $response['headers']['status-code']); - } - - - public function testCreateCustomNodeExecution() - { - $name = 'node-18.0'; - $folder = 'node'; - $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; - $this->packageCode($folder); - - $entrypoint = 'index.js'; - $timeout = 2; - - $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'functionId' => ID::unique(), - 'name' => 'Test ' . $name, - 'runtime' => $name, - 'events' => [], - 'timeout' => $timeout, - ]); - - $functionId = $function['body']['$id'] ?? ''; - - $this->assertEquals(201, $function['headers']['status-code']); - - // Create variable - $variable = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/variables', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'key' => 'CUSTOM_VARIABLE', - 'value' => 'variable', - ]); - - $this->assertEquals(201, $variable['headers']['status-code']); - - $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ - 'content-type' => 'multipart/form-data', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'entrypoint' => $entrypoint, - 'code' => new CURLFile($code, 'application/x-gzip', basename($code)), - 'activate' => true, - ]); - - $deploymentId = $deployment['body']['$id'] ?? ''; - $this->assertEquals(202, $deployment['headers']['status-code']); - - // Allow build step to run - sleep(20); - - $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'data' => 'foobar', - 'async' => true - ]); - - $executionId = $execution['body']['$id'] ?? ''; - - $this->assertEquals(202, $execution['headers']['status-code']); - - $executionId = $execution['body']['$id'] ?? ''; - - sleep(20); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $output = json_decode($executions['body']['response'], true); - - $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertEquals('completed', $executions['body']['status']); - $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); - $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); - $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); - $this->assertEquals('Node.js', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); - $this->assertEquals('18.0', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); - $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); - $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); - $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals($executions['headers']['status-code'], 200); - $this->assertEquals($executions['body']['total'], 1); - $this->assertIsArray($executions['body']['executions']); - $this->assertCount(1, $executions['body']['executions']); - $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); - $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); - - // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'], - ], []); - - $this->assertEquals(204, $response['headers']['status-code']); - } - - public function testCreateCustomPythonExecution() - { - $name = 'python-3.9'; - $folder = 'python'; - $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; - $this->packageCode($folder); - - $entrypoint = 'main.py'; - $timeout = 2; - - $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'functionId' => ID::unique(), - 'name' => 'Test ' . $name, - 'runtime' => $name, - 'events' => [], - 'timeout' => $timeout, - ]); - - $functionId = $function['body']['$id'] ?? ''; - - $this->assertEquals(201, $function['headers']['status-code']); - - /** Create Variables */ - $variable = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/variables', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'key' => 'CUSTOM_VARIABLE', - 'value' => 'variable', - ]); - - $this->assertEquals(201, $variable['headers']['status-code']); - - $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ - 'content-type' => 'multipart/form-data', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'entrypoint' => $entrypoint, - 'code' => new CURLFile($code, 'application/x-gzip', basename($code)), - 'activate' => true, - ]); - - $deploymentId = $deployment['body']['$id'] ?? ''; - $this->assertEquals(202, $deployment['headers']['status-code']); - - // Allow build step to run - sleep(60); - - $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'data' => 'foobar', - 'async' => true - ]); - - $executionId = $execution['body']['$id'] ?? ''; - - $this->assertEquals(202, $execution['headers']['status-code']); - - $executionId = $execution['body']['$id'] ?? ''; - - sleep(60); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $output = json_decode($executions['body']['response'], true); - - $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertEquals('completed', $executions['body']['status']); - $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); - $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); - $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); - $this->assertEquals('Python', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); - $this->assertEquals('3.9', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); $this->assertEquals('variable', $output['CUSTOM_VARIABLE']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); + $this->assertEmpty($output['APPWRITE_FUNCTION_USER_ID']); $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); + $this->assertStringContainsString('Amazing Function Log', $execution['body']['logs']); + $this->assertEmpty($execution['body']['errors']); $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', @@ -1254,7 +1082,7 @@ class FunctionsCustomServerTest extends Scope $this->assertCount(1, $executions['body']['executions']); $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); + $this->assertStringContainsString('Amazing Function Log', $executions['body']['executions'][0]['logs']); // Cleanup : Delete function $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ @@ -1266,336 +1094,6 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); } - // public function testCreateCustomDartExecution() - // { - // $name = 'dart-2.15'; - // $folder = 'dart'; - // $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; - // $this->packageCode($folder); - - // $entrypoint = 'main.dart'; - // $timeout = 2; - - // $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'functionId' => ID::unique(), - // 'name' => 'Test ' . $name, - // 'runtime' => $name, - // 'events' => [], - // 'timeout' => $timeout, - // ]); - - // $functionId = $function['body']['$id'] ?? ''; - - // $this->assertEquals(201, $function['headers']['status-code']); - - // /** Create Variables */ - // $variable = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/variables', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'key' => 'CUSTOM_VARIABLE', - // 'value' => 'variable', - // ]); - - // $this->assertEquals(201, $variable['headers']['status-code']); - - // $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ - // 'content-type' => 'multipart/form-data', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'entrypoint' => $entrypoint, - // 'code' => new CURLFile($code, 'application/x-gzip', basename($code)), - // 'activate' => true, - // ]); - - // $deploymentId = $deployment['body']['$id'] ?? ''; - // $this->assertEquals(202, $deployment['headers']['status-code']); - - // // Allow build step to run - // sleep(80); - - // $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'data' => 'foobar', - // 'async' => true - // ]); - - // $executionId = $execution['body']['$id'] ?? ''; - - // $this->assertEquals(202, $execution['headers']['status-code']); - - // $executionId = $execution['body']['$id'] ?? ''; - - // sleep(20); - - // $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders())); - - // $output = json_decode($executions['body']['response'], true); - - // $this->assertEquals(200, $executions['headers']['status-code']); - // $this->assertEquals('completed', $executions['body']['status']); - // $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - // $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); - // $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); - // $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); - // $this->assertEquals('Dart', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); - // $this->assertEquals('2.15', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); - // $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - // $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); - // $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); - // $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); - // $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); - // $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - - // $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders())); - - // $this->assertEquals($executions['headers']['status-code'], 200); - // $this->assertEquals($executions['body']['total'], 1); - // $this->assertIsArray($executions['body']['executions']); - // $this->assertCount(1, $executions['body']['executions']); - // $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); - // $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - // $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); - - // // Cleanup : Delete function - // $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // 'x-appwrite-key' => $this->getProject()['apiKey'], - // ], []); - - // $this->assertEquals(204, $response['headers']['status-code']); - // } - - #[Retry(count: 1)] - public function testCreateCustomRubyExecution() - { - $name = 'ruby-3.1'; - $folder = 'ruby'; - $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; - $this->packageCode($folder); - - $entrypoint = 'main.rb'; - $timeout = 2; - - $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'functionId' => ID::unique(), - 'name' => 'Test ' . $name, - 'runtime' => $name, - 'events' => [], - 'timeout' => $timeout, - ]); - - $functionId = $function['body']['$id'] ?? ''; - - $this->assertEquals(201, $function['headers']['status-code']); - - /** Create Variables */ - $variable = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/variables', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'key' => 'CUSTOM_VARIABLE', - 'value' => 'variable', - ]); - - $this->assertEquals(201, $variable['headers']['status-code']); - - $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ - 'content-type' => 'multipart/form-data', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'entrypoint' => $entrypoint, - 'code' => new CURLFile($code, 'application/x-gzip', basename($code)), - 'activate' => true, - ]); - - $deploymentId = $deployment['body']['$id'] ?? ''; - $this->assertEquals(202, $deployment['headers']['status-code']); - - // Allow build step to run - sleep(60); - - $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'data' => 'foobar', - 'async' => true - ]); - - $executionId = $execution['body']['$id'] ?? ''; - - $this->assertEquals(202, $execution['headers']['status-code']); - - $executionId = $execution['body']['$id'] ?? ''; - - sleep(20); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $output = json_decode($executions['body']['response'], true); - - $this->assertEquals(200, $executions['headers']['status-code']); - $this->assertEquals('completed', $executions['body']['status']); - $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); - $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); - $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); - $this->assertEquals('Ruby', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); - $this->assertEquals('3.1', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); - $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); - $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); - $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); - $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - - $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals($executions['headers']['status-code'], 200); - $this->assertEquals($executions['body']['total'], 1); - $this->assertIsArray($executions['body']['executions']); - $this->assertCount(1, $executions['body']['executions']); - $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); - $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); - - // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'], - ], []); - - $this->assertEquals(204, $response['headers']['status-code']); - } - - // public function testCreateCustomSwiftExecution() - // { - // $name = 'swift-5.5'; - // $folder = 'swift'; - // $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; - // $this->packageCode($folder); - - // $entrypoint = 'index.swift'; - // $timeout = 5; - - // $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'functionId' => ID::unique(), - // 'name' => 'Test '.$name, - // 'runtime' => $name, - // 'vars' => [ - // 'CUSTOM_VARIABLE' => 'variable', - // ], - // 'events' => [], - // 'schedule' => '', - // 'timeout' => $timeout, - // ]); - - // $functionId = $function['body']['$id'] ?? ''; - - // $this->assertEquals(201, $function['headers']['status-code']); - - // $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ - // 'content-type' => 'multipart/form-data', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'entrypoint' => $entrypoint, - // 'code' => new CURLFile($code, 'application/x-gzip', basename($code)), - // 'activate' => true, - // ]); - - // $deploymentId = $deployment['body']['$id'] ?? ''; - // $this->assertEquals(202, $deployment['headers']['status-code']); - - // // Allow (slow) build step to run - // sleep(300); - - // $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders()), [ - // 'data' => 'foobar', - // ]); - - // $executionId = $execution['body']['$id'] ?? ''; - - // $this->assertEquals(202, $execution['headers']['status-code']); - - // $executionId = $execution['body']['$id'] ?? ''; - - // sleep(10); - - // $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders())); - - // $output = json_decode($executions['body']['response'], true); - - // $this->assertEquals(200, $executions['headers']['status-code']); - // $this->assertEquals('completed', $executions['body']['status']); - // $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - // $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); - // $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); - // $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); - // $this->assertEquals('Swift', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); - // $this->assertEquals('5.5', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); - // $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); - // $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); - // $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); - // $this->assertEquals('variable', $output['CUSTOM_VARIABLE']); - // $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); - // $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); - // $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - - // $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // ], $this->getHeaders())); - - // $this->assertEquals($executions['headers']['status-code'], 200); - // $this->assertEquals($executions['body']['total'], 1); - // $this->assertIsArray($executions['body']['executions']); - // $this->assertCount(1, $executions['body']['executions']); - // $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); - // $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - // $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); - - // // Cleanup : Delete function - // $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'], - // 'x-appwrite-key' => $this->getProject()['apiKey'], - // ], []); - - // $this->assertEquals(204, $response['headers']['status-code']); - // } - public function testGetRuntimes() { $runtimes = $this->client->call(Client::METHOD_GET, '/functions/runtimes', array_merge([ diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 124eec26f3..3a4b88e2c2 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -120,7 +120,7 @@ trait Base public static string $GET_TEAM_MEMBERSHIP = 'get_team_membership'; public static string $GET_TEAM_MEMBERSHIPS = 'list_team_memberships'; public static string $CREATE_TEAM_MEMBERSHIP = 'create_team_membership'; - public static string $UPDATE_TEAM_MEMBERSHIP_ROLES = 'update_team_membership_roles'; + public static string $UPDATE_TEAM_MEMBERSHIP = 'update_team_membership'; public static string $UPDATE_TEAM_MEMBERSHIP_STATUS = 'update_membership_status'; public static string $DELETE_TEAM_MEMBERSHIP = 'delete_team_membership'; @@ -1296,9 +1296,9 @@ trait Base roles } }'; - case self::$UPDATE_TEAM_MEMBERSHIP_ROLES: - return 'mutation updateTeamMembershipRoles($teamId: String!, $membershipId: String!, $roles: [String!]!){ - teamsUpdateMembershipRoles(teamId: $teamId, membershipId: $membershipId, roles: $roles) { + case self::$UPDATE_TEAM_MEMBERSHIP: + return 'mutation updateTeamMembership($teamId: String!, $membershipId: String!, $roles: [String!]!){ + teamsUpdateMembership(teamId: $teamId, membershipId: $membershipId, roles: $roles) { _id userId teamId @@ -1368,8 +1368,7 @@ trait Base total deployments { _id - buildStdout - buildStderr + buildLogs } } }'; @@ -1377,14 +1376,15 @@ trait Base return 'query getDeployment($functionId: String!, $deploymentId: String!) { functionsGetDeployment(functionId: $functionId, deploymentId: $deploymentId) { _id + resourceId buildId - buildStdout - buildStderr + buildLogs + status } }'; case self::$CREATE_FUNCTION: - return 'mutation createFunction($functionId: String!, $name: String!, $execute: [String!]!, $runtime: String! $events: [String], $schedule: String, $timeout: Int) { - functionsCreate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, events: $events, schedule: $schedule, timeout: $timeout) { + return 'mutation createFunction($functionId: String!, $name: String!, $runtime: String!, $execute: [String!]!, $events: [String], $schedule: String, $timeout: Int, $entrypoint: String!) { + functionsCreate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, events: $events, schedule: $schedule, timeout: $timeout, entrypoint: $entrypoint) { _id name runtime @@ -1392,8 +1392,8 @@ trait Base } }'; case self::$UPDATE_FUNCTION: - return 'mutation updateFunction($functionId: String!, $name: String!, $execute: [String!]!, $events: [String], $schedule: String, $timeout: Int) { - functionsUpdate(functionId: $functionId, name: $name, execute: $execute, events: $events, schedule: $schedule, timeout: $timeout) { + return 'mutation updateFunction($functionId: String!, $name: String!, $execute: [String!]!, $runtime: String!, $entrypoint: String!, $events: [String], $schedule: String, $timeout: Int) { + functionsUpdate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, entrypoint: $entrypoint, events: $events, schedule: $schedule, timeout: $timeout) { _id name runtime @@ -1457,15 +1457,14 @@ trait Base } }'; case self::$CREATE_DEPLOYMENT: - return 'mutation createDeployment($functionId: String!, $entrypoint: String!, $code: InputFile!, $activate: Boolean!) { - functionsCreateDeployment(functionId: $functionId, entrypoint: $entrypoint, code: $code, activate: $activate) { + return 'mutation createDeployment($functionId: String!, $code: InputFile!, $activate: Boolean!) { + functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate) { _id buildId entrypoint size status - buildStdout - buildStderr + buildLogs } }'; case self::$DELETE_DEPLOYMENT: @@ -1478,8 +1477,10 @@ trait Base return 'query getExecution($functionId: String!$executionId: String!) { functionsGetExecution(functionId: $functionId, executionId: $executionId) { _id + functionId status - stderr + logs + errors } }'; case self::$GET_EXECUTIONS: @@ -1488,17 +1489,21 @@ trait Base total executions { _id + functionId status - stderr + logs + errors } } }'; case self::$CREATE_EXECUTION: - return 'mutation createExecution($functionId: String!, $data: String, $async: Boolean) { - functionsCreateExecution(functionId: $functionId, data: $data, async: $async) { + return 'mutation createExecution($functionId: String!, $body: String, $async: Boolean) { + functionsCreateExecution(functionId: $functionId, body: $body, async: $async) { _id + functionId status - stderr + logs + errors } }'; case self::$DELETE_EXECUTION: diff --git a/tests/e2e/Services/GraphQL/FunctionsClientTest.php b/tests/e2e/Services/GraphQL/FunctionsClientTest.php index d5b50250d4..363f7a0fb1 100644 --- a/tests/e2e/Services/GraphQL/FunctionsClientTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsClientTest.php @@ -26,6 +26,7 @@ class FunctionsClientTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test Function', 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'execute' => [Role::any()->toString()], ] ]; @@ -36,7 +37,6 @@ class FunctionsClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $this->assertIsArray($function['body']['data']); $this->assertArrayNotHasKey('errors', $function['body']); @@ -88,7 +88,6 @@ class FunctionsClientTest extends Scope 'query' => $query, 'variables' => [ 'functionId' => $function['_id'], - 'entrypoint' => 'index.php', 'activate' => true, 'code' => null, ] @@ -108,9 +107,44 @@ class FunctionsClientTest extends Scope $this->assertIsArray($deployment['body']['data']); $this->assertArrayNotHasKey('errors', $deployment['body']); - sleep(15); + // Poll get deployment until an error, or status is either 'ready' or 'failed' + $deployment = $deployment['body']['data']['functionsCreateDeployment']; + $deploymentId = $deployment['_id']; - return $deployment['body']['data']['functionsCreateDeployment']; + $query = $this->getQuery(self::$GET_DEPLOYMENT); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'functionId' => $function['_id'], + 'deploymentId' => $deploymentId, + ] + ]; + + while (true) { + $deployment = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $this->assertIsArray($deployment['body']['data']); + $this->assertArrayNotHasKey('errors', $deployment['body']); + + $deployment = $deployment['body']['data']['functionsGetDeployment']; + + if ( + $deployment['status'] === 'ready' + || $deployment['status'] === 'failed' + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['status']); + + return $deployment; } /** diff --git a/tests/e2e/Services/GraphQL/FunctionsServerTest.php b/tests/e2e/Services/GraphQL/FunctionsServerTest.php index 75aa0d5d04..49a8fd61f2 100644 --- a/tests/e2e/Services/GraphQL/FunctionsServerTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsServerTest.php @@ -25,6 +25,7 @@ class FunctionsServerTest extends Scope 'variables' => [ 'functionId' => ID::unique(), 'name' => 'Test Function', + 'entrypoint' => 'index.php', 'runtime' => 'php-8.0', 'execute' => [Role::any()->toString()], ] @@ -86,7 +87,6 @@ class FunctionsServerTest extends Scope 'query' => $query, 'variables' => [ 'functionId' => $function['_id'], - 'entrypoint' => 'index.php', 'activate' => true, 'code' => null, ] @@ -105,26 +105,59 @@ class FunctionsServerTest extends Scope $this->assertIsArray($deployment['body']['data']); $this->assertArrayNotHasKey('errors', $deployment['body']); - sleep(15); + // Poll get deployment until an error, or status is either 'ready' or 'failed' + $deployment = $deployment['body']['data']['functionsCreateDeployment']; + $deploymentId = $deployment['_id']; - return $deployment['body']['data']['functionsCreateDeployment']; + $query = $this->getQuery(self::$GET_DEPLOYMENT); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'functionId' => $function['_id'], + 'deploymentId' => $deploymentId, + ] + ]; + + while (true) { + $deployment = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($deployment['body']['data']); + $this->assertArrayNotHasKey('errors', $deployment['body']); + + $deployment = $deployment['body']['data']['functionsGetDeployment']; + + if ( + $deployment['status'] === 'ready' + || $deployment['status'] === 'failed' + ) { + break; + } + + \sleep(1); + } + + $this->assertEquals('ready', $deployment['status']); + + return $deployment; } /** - * * @depends testCreateFunction * @depends testCreateDeployment - * @param $function + * @param $deployment * @return array * @throws \Exception */ - public function testCreateExecution($function): array + public function testCreateExecution($deployment): array { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$CREATE_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ - 'functionId' => $function['_id'], + 'functionId' => $deployment['resourceId'], ] ]; @@ -140,33 +173,31 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @depends testGetDeployment - * @param $function * @param $deployment - * @return array + * @return void * @throws \Exception */ - public function testCreateRetryBuild($function, $deployment): void + public function testCreateRetryBuild($deployment): void { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$RETRY_BUILD); $gqlPayload = [ 'query' => $query, 'variables' => [ - 'functionId' => $function['_id'], + 'functionId' => $deployment['resourceId'], 'deploymentId' => $deployment['_id'], 'buildId' => $deployment['buildId'], ] ]; - $retryBuild = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); - $this->assertIsArray($retryBuild['body']['errors']); - $this->assertEquals("Build not failed", $retryBuild['body']['errors'][0]['message']); + $this->assertIsNotArray($response['body']); + $this->assertEquals(204, $response['headers']['status-code']); } public function testGetFunctions(): array @@ -272,20 +303,19 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @depends testCreateDeployment - * @param $function + * @param $deployment * @return array * @throws \Exception */ - public function testGetDeployment($function, $deployment) + public function testGetDeployment($deployment) { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ - 'functionId' => $function['_id'], + 'functionId' => $deployment['resourceId'], 'deploymentId' => $deployment['_id'], ] ]; @@ -334,21 +364,19 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @depends testCreateExecution - * @param $function * @param $execution * @return array * @throws \Exception */ - public function testGetExecution($function, $execution): array + public function testGetExecution($execution): array { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$GET_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ - 'functionId' => $function['_id'], + 'functionId' => $execution['functionId'], 'executionId' => $execution['_id'], ] ]; @@ -382,6 +410,8 @@ class FunctionsServerTest extends Scope 'functionId' => $function['_id'], 'name' => 'Test Function Updated', 'execute' => [Role::any()->toString()], + 'entrypoint' => 'index.php', + 'runtime' => 'php-8.0', 'vars' => [ 'name' => 'John Doe', 'age' => 42, @@ -403,20 +433,18 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @depends testCreateDeployment - * @param $function * @param $deployment * @throws \Exception */ - public function testDeleteDeployment($function, $deployment): void + public function testDeleteDeployment($deployment): array { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$DELETE_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ - 'functionId' => $function['_id'], + 'functionId' => $deployment['resourceId'], 'deploymentId' => $deployment['_id'], ] ]; @@ -428,22 +456,23 @@ class FunctionsServerTest extends Scope $this->assertIsNotArray($response['body']); $this->assertEquals(204, $response['headers']['status-code']); + + return $deployment; } /** - * @depends testCreateFunction * @depends testDeleteDeployment - * @param $function + * @param $deployment * @throws \Exception */ - public function testDeleteFunction($function): void + public function testDeleteFunction($deployment): void { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$DELETE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ - 'functionId' => $function['_id'], + 'functionId' => $deployment['resourceId'], ] ]; diff --git a/tests/e2e/Services/GraphQL/TeamsServerTest.php b/tests/e2e/Services/GraphQL/TeamsServerTest.php index 9654501fe4..33c7847113 100644 --- a/tests/e2e/Services/GraphQL/TeamsServerTest.php +++ b/tests/e2e/Services/GraphQL/TeamsServerTest.php @@ -251,7 +251,7 @@ class TeamsServerTest extends Scope public function testUpdateTeamMembershipRoles($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_MEMBERSHIP_ROLES); + $query = $this->getQuery(self::$UPDATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -268,7 +268,7 @@ class TeamsServerTest extends Scope $this->assertIsArray($membership['body']['data']); $this->assertArrayNotHasKey('errors', $membership['body']); - $membership = $membership['body']['data']['teamsUpdateMembershipRoles']; + $membership = $membership['body']['data']['teamsUpdateMembership']; $this->assertEquals(['developer', 'admin'], $membership['roles']); } diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 67c8ae2c6e..ff3f8e8e94 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -130,7 +130,6 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(409, $response['headers']['status-code']); $this->assertEquals(409, $response['body']['code']); $this->assertEquals(Exception::PROJECT_ALREADY_EXISTS, $response['body']['type']); - $this->assertEquals('Project with the requested ID already exists.', $response['body']['message']); } /** @group projectsCRUD */ @@ -446,7 +445,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/project/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -455,14 +454,14 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(count($response['body']), 9); $this->assertNotEmpty($response['body']); $this->assertEquals('30d', $response['body']['range']); - $this->assertIsArray($response['body']['requestsTotal']); + $this->assertIsArray($response['body']['requests']); $this->assertIsArray($response['body']['network']); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['documentsTotal']); - $this->assertIsArray($response['body']['databasesTotal']); - $this->assertIsArray($response['body']['bucketsTotal']); - $this->assertIsArray($response['body']['usersTotal']); - $this->assertIsArray($response['body']['filesStorage']); + $this->assertIsArray($response['body']['executions']); + $this->assertIsArray($response['body']['documents']); + $this->assertIsArray($response['body']['databases']); + $this->assertIsArray($response['body']['buckets']); + $this->assertIsArray($response['body']['users']); + $this->assertIsArray($response['body']['storage']); /** * Test for FAILURE @@ -541,7 +540,8 @@ class ProjectsConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'enabled' => true, - 'sender' => 'mailer@appwrite.io', + 'senderEmail' => 'mailer@appwrite.io', + 'senderName' => 'Mailer', 'host' => 'maildev', 'port' => 1025, 'username' => 'user', @@ -550,7 +550,8 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertTrue($response['body']['smtpEnabled']); - $this->assertEquals('mailer@appwrite.io', $response['body']['smtpSender']); + $this->assertEquals('mailer@appwrite.io', $response['body']['smtpSenderEmail']); + $this->assertEquals('Mailer', $response['body']['smtpSenderName']); $this->assertEquals('maildev', $response['body']['smtpHost']); $this->assertEquals(1025, $response['body']['smtpPort']); $this->assertEquals('user', $response['body']['smtpUsername']); @@ -565,31 +566,21 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertTrue($response['body']['smtpEnabled']); - $this->assertEquals('mailer@appwrite.io', $response['body']['smtpSender']); + $this->assertEquals('mailer@appwrite.io', $response['body']['smtpSenderEmail']); + $this->assertEquals('Mailer', $response['body']['smtpSenderName']); $this->assertEquals('maildev', $response['body']['smtpHost']); $this->assertEquals(1025, $response['body']['smtpPort']); $this->assertEquals('user', $response['body']['smtpUsername']); $this->assertEquals('password', $response['body']['smtpPassword']); $this->assertEquals('', $response['body']['smtpSecure']); - /** Reset */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'enabled' => false, - 'sender' => 'mailer@appwrite.io', - 'host' => 'maildev', - 'port' => 1025, - 'username' => 'user', - 'password' => 'password', - ]); return $data; } /** * @group smtpAndTemplates - * @depends testCreateProject */ + * @depends testUpdateProjectSMTP + */ public function testUpdateTemplates($data): array { $id = $data['projectId']; @@ -602,11 +593,9 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals('Account Verification', $response['body']['subject']); - $this->assertEquals('Project Test 2 Team', $response['body']['senderName']); - $this->assertEquals('team@appwrite.io', $response['body']['senderEmail']); + $this->assertEquals('', $response['body']['senderEmail']); $this->assertEquals('verification', $response['body']['type']); $this->assertEquals('en-us', $response['body']['locale']); - $this->assertMatchesRegularExpression('//', $response['body']['message']); /** Update Email template */ $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([ @@ -641,40 +630,41 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('en-us', $response['body']['locale']); $this->assertEquals('Please verify your email {{url}}', $response['body']['message']); - /** Get Default SMS Template */ - $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + // Temporary disabled until implemented + // /** Get Default SMS Template */ + // $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $this->getProject()['$id'], + // ], $this->getHeaders())); - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals('verification', $response['body']['type']); - $this->assertEquals('en-us', $response['body']['locale']); - $this->assertEquals('{{token}}', $response['body']['message']); + // $this->assertEquals(200, $response['headers']['status-code']); + // $this->assertEquals('verification', $response['body']['type']); + // $this->assertEquals('en-us', $response['body']['locale']); + // $this->assertEquals('{{token}}', $response['body']['message']); - /** Update SMS template */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'message' => 'Please verify your email {{token}}', - ]); + // /** Update SMS template */ + // $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $this->getProject()['$id'], + // ], $this->getHeaders()), [ + // 'message' => 'Please verify your email {{token}}', + // ]); - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals('verification', $response['body']['type']); - $this->assertEquals('en-us', $response['body']['locale']); - $this->assertEquals('Please verify your email {{token}}', $response['body']['message']); + // $this->assertEquals(200, $response['headers']['status-code']); + // $this->assertEquals('verification', $response['body']['type']); + // $this->assertEquals('en-us', $response['body']['locale']); + // $this->assertEquals('Please verify your email {{token}}', $response['body']['message']); - /** Get Updated SMS Template */ - $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + // /** Get Updated SMS Template */ + // $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $this->getProject()['$id'], + // ], $this->getHeaders())); - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals('verification', $response['body']['type']); - $this->assertEquals('en-us', $response['body']['locale']); - $this->assertEquals('Please verify your email {{token}}', $response['body']['message']); + // $this->assertEquals(200, $response['headers']['status-code']); + // $this->assertEquals('verification', $response['body']['type']); + // $this->assertEquals('en-us', $response['body']['locale']); + // $this->assertEquals('Please verify your email {{token}}', $response['body']['message']); return $data; } @@ -752,7 +742,6 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); // Check session doesn't expire too soon. - sleep(30); // Get User @@ -3135,171 +3124,6 @@ class ProjectsConsoleClientTest extends Scope return $data; } - // Domains - - /** - * @depends testCreateProject - */ - public function testCreateProjectDomain($data): array - { - $id = $data['projectId'] ?? ''; - - $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/domains', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'domain' => 'sub.example.com', - ]); - - $this->assertEquals(201, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']['$id']); - // $this->assertIsInt($response['body']['updated']); - $this->assertEquals('sub.example.com', $response['body']['domain']); - $this->assertEquals('com', $response['body']['tld']); - $this->assertEquals('example.com', $response['body']['registerable']); - $this->assertEquals(false, $response['body']['verification']); - - $data = array_merge($data, ['domainId' => $response['body']['$id']]); - - /** - * Test for FAILURE - */ - $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'domain' => '123', - ]); - - $this->assertEquals(400, $response['headers']['status-code']); - - $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'type' => 'web', - 'name' => 'Too Long Hostname', - 'hostname' => \str_repeat("bestdomain", 25) . '.com' // 250 + 4 chars total (exactly above limit) - ]); - - return $data; - } - - /** - * @depends testCreateProjectDomain - */ - public function testListProjectDomain($data): array - { - $id = $data['projectId'] ?? ''; - - $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(1, $response['body']['total']); - - /** - * Test for FAILURE - */ - - return $data; - } - - /** - * @depends testCreateProjectDomain - */ - public function testGetProjectDomain($data): array - { - $id = $data['projectId'] ?? ''; - $domainId = $data['domainId'] ?? ''; - - $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains/' . $domainId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals($domainId, $response['body']['$id']); - // $this->assertIsInt($response['body']['updated']); - $this->assertEquals('sub.example.com', $response['body']['domain']); - $this->assertEquals('com', $response['body']['tld']); - $this->assertEquals('example.com', $response['body']['registerable']); - $this->assertEquals(false, $response['body']['verification']); - - /** - * Test for FAILURE - */ - $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains/error', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(404, $response['headers']['status-code']); - - return $data; - } - - /** - * @depends testCreateProjectDomain - */ - public function testUpdateProjectDomain($data): array - { - $id = $data['projectId'] ?? ''; - $domainId = $data['domainId'] ?? ''; - - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/domains/' . $domainId . '/verification', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(401, $response['headers']['status-code']); - - /** - * Test for FAILURE - */ - - return $data; - } - - /** - * @depends testCreateProjectDomain - */ - public function testDeleteProjectDomain($data): array - { - $id = $data['projectId'] ?? ''; - $domainId = $data['domainId'] ?? ''; - - $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/domains/' . $domainId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(204, $response['headers']['status-code']); - $this->assertEmpty($response['body']); - - $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains/' . $domainId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(404, $response['headers']['status-code']); - - /** - * Test for FAILURE - */ - $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/domains/error', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(404, $response['headers']['status-code']); - - return $data; - } - public function testDeleteProject(): array { $data = []; diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 3ef258885c..9c91ac4a52 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -438,6 +438,7 @@ class RealtimeConsoleClientTest extends Scope 'functionId' => ID::unique(), 'name' => 'Test', 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'events' => [ 'users.*.create', 'users.*.delete', @@ -450,7 +451,6 @@ class RealtimeConsoleClientTest extends Scope $this->assertEquals(201, $response1['headers']['status-code']); - $projectId = 'console'; $client = $this->getWebsocket(['console'], [ diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 4f880338a4..56796280ad 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -1263,6 +1263,7 @@ class RealtimeCustomClientTest extends Scope 'name' => 'Test', 'execute' => ['users'], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'timeout' => 10, ]); @@ -1293,8 +1294,23 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals($deployment['headers']['status-code'], 202); $this->assertNotEmpty($deployment['body']['$id']); - // Wait for deployment to be built. - sleep(10); + // Poll until deployment is built + while (true) { + $deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + + if ( + $deployment['headers']['status-code'] >= 400 + || \in_array($deployment['body']['status'], ['ready', 'failed']) + ) { + break; + } + + \sleep(1); + } $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index b19fe49ed0..5463740761 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Storage; +use Appwrite\Extend\Exception; use CURLFile; use Tests\E2E\Client; use Utopia\Database\DateTime; @@ -262,7 +263,7 @@ trait StorageBase ]); $this->assertEquals(400, $res['headers']['status-code']); - $this->assertEquals('The value for x-appwrite-id header is invalid. Please check the value of the x-appwrite-id header is valid id and not unique().', $res['body']['message']); + $this->assertEquals(Exception::STORAGE_INVALID_APPWRITE_ID, $res['body']['type']); return ['bucketId' => $bucketId, 'fileId' => $file['body']['$id'], 'largeFileId' => $largeFile['body']['$id'], 'largeBucketId' => $bucket2['body']['$id']]; } @@ -316,6 +317,54 @@ trait StorageBase return ['bucketId' => $bucketId]; } + public function testCreateBucketFileNoCollidingId(): void + { + $bucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'bucketId' => ID::unique(), + 'name' => 'Test Bucket', + 'maximumFileSize' => 2000000, //2MB + 'allowedFileExtensions' => ["jpg", "png"], + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $this->assertEquals(201, $bucket['headers']['status-code']); + $this->assertNotEmpty($bucket['body']['$id']); + + $bucketId = $bucket['body']['$id']; + + $fileId = ID::unique(); + + $file = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucketId . '/files', array_merge([ + 'content-type' => 'multipart/form-data', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'fileId' => $fileId, + 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), + ]); + + $this->assertEquals(201, $file['headers']['status-code']); + $this->assertEquals($fileId, $file['body']['$id']); + + $file = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucketId . '/files', array_merge([ + 'content-type' => 'multipart/form-data', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'fileId' => $fileId, + 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/file.png'), 'image/png', 'file.png'), + ]); + + $this->assertEquals(409, $file['headers']['status-code']); + } + /** * @depends testCreateBucketFile */ @@ -787,7 +836,7 @@ trait StorageBase $this->assertEquals(204, $file['headers']['status-code']); $this->assertEmpty($file['body']); - $file = $this->client->call(Client::METHOD_GET, '/storage/files/' . $data['fileId'], array_merge([ + $file = $this->client->call(Client::METHOD_GET, '/storage/buckets/' . $data['bucketId'] . '/files/' . $data['fileId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index aff055f18d..8fda8e0464 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -39,11 +39,10 @@ class StorageConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(4, count($response['body'])); + $this->assertEquals(12, count($response['body'])); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['bucketsTotal']); - $this->assertIsArray($response['body']['filesTotal']); - $this->assertIsArray($response['body']['filesStorage']); + $this->assertIsArray($response['body']['storage']); + $this->assertIsArray($response['body']['filesCount']); } public function testGetStorageBucketUsage() @@ -95,9 +94,13 @@ class StorageConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 3); + $this->assertEquals(count($response['body']), 7); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['filesTotal']); + $this->assertIsArray($response['body']['filesCount']); + $this->assertIsArray($response['body']['filesCreate']); + $this->assertIsArray($response['body']['filesRead']); + $this->assertIsArray($response['body']['filesUpdate']); + $this->assertIsArray($response['body']['filesDelete']); $this->assertIsArray($response['body']['filesStorage']); } } diff --git a/tests/e2e/Services/Users/UsersConsoleClientTest.php b/tests/e2e/Services/Users/UsersConsoleClientTest.php index 8943bfab63..9cc23e825a 100644 --- a/tests/e2e/Services/Users/UsersConsoleClientTest.php +++ b/tests/e2e/Services/Users/UsersConsoleClientTest.php @@ -23,6 +23,17 @@ class UsersConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ 'range' => '32h', + 'provider' => 'email' + ]); + + $this->assertEquals($response['headers']['status-code'], 400); + + $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '24h', + 'provider' => 'some-random-provider' ]); $this->assertEquals($response['headers']['status-code'], 400); @@ -35,12 +46,38 @@ class UsersConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ 'range' => '24h', + 'provider' => 'email' ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 3); + $this->assertEquals(count($response['body']), 9); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['usersTotal']); - $this->assertIsArray($response['body']['sessionsTotal']); + $this->assertIsArray($response['body']['usersCount']); + $this->assertIsArray($response['body']['usersCreate']); + $this->assertIsArray($response['body']['usersRead']); + $this->assertIsArray($response['body']['usersUpdate']); + $this->assertIsArray($response['body']['usersDelete']); + $this->assertIsArray($response['body']['sessionsCreate']); + $this->assertIsArray($response['body']['sessionsProviderCreate']); + $this->assertIsArray($response['body']['sessionsDelete']); + + $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '24h' + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertEquals(count($response['body']), 9); + $this->assertEquals($response['body']['range'], '24h'); + $this->assertIsArray($response['body']['usersCount']); + $this->assertIsArray($response['body']['usersCreate']); + $this->assertIsArray($response['body']['usersRead']); + $this->assertIsArray($response['body']['usersUpdate']); + $this->assertIsArray($response['body']['usersDelete']); + $this->assertIsArray($response['body']['sessionsCreate']); + $this->assertIsArray($response['body']['sessionsProviderCreate']); + $this->assertIsArray($response['body']['sessionsDelete']); } } diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 02c3a2dbfd..01aa00cd84 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -401,6 +401,7 @@ class WebhooksCustomServerTest extends Scope 'name' => 'Test', 'execute' => [Role::any()->toString()], 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'timeout' => 10, ]); @@ -415,18 +416,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - // $this->assertStringContainsString('functions.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - // $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); - // $this->assertStringContainsString("functions.{$id}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); TODO @christyjacob4 : enable test once we allow functions.* events $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - /** - * Test for FAILURE - */ - return [ 'functionId' => $id, ]; @@ -448,6 +441,7 @@ class WebhooksCustomServerTest extends Scope ], $this->getHeaders()), [ 'name' => 'Test', 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', 'execute' => [Role::any()->toString()], 'vars' => [ 'key1' => 'value1', diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index 6b0644c01e..3baae7316d 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -69,6 +69,7 @@ services: - _APP_OPTIONS_FORCE_HTTPS - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN + - _APP_DOMAIN_FUNCTIONS - _APP_DOMAIN_TARGET - _APP_REDIS_HOST - _APP_REDIS_PORT diff --git a/tests/resources/functions/dart/main.dart b/tests/resources/functions/dart/main.dart index 0a6cabdac7..1ed09c3485 100644 --- a/tests/resources/functions/dart/main.dart +++ b/tests/resources/functions/dart/main.dart @@ -1,29 +1,21 @@ -/* - 'req' variable has: - 'headers' - object with request headers - 'payload' - object with request body data - 'variables' - object with function variables - 'res' variable has: - 'send(text, status)' - function to return text response. Status code defaults to 200 - 'json(obj, status)' - function to return JSON response. Status code defaults to 200 - - If an error is thrown, a response with code 500 will be returned. -*/ +import 'dart:io' show Platform; + +Future main(final context) async { + context.log('Amazing Function Log'); -Future start(final request, final response) async { response.json({ - 'APPWRITE_FUNCTION_ID' : request.variables['APPWRITE_FUNCTION_ID'], - 'APPWRITE_FUNCTION_NAME' : request.variables['APPWRITE_FUNCTION_NAME'], - 'APPWRITE_FUNCTION_DEPLOYMENT' : request.variables['APPWRITE_FUNCTION_DEPLOYMENT'], - 'APPWRITE_FUNCTION_TRIGGER' : request.variables['APPWRITE_FUNCTION_TRIGGER'], - 'APPWRITE_FUNCTION_RUNTIME_NAME' : request.variables['APPWRITE_FUNCTION_RUNTIME_NAME'], - 'APPWRITE_FUNCTION_RUNTIME_VERSION' : request.variables['APPWRITE_FUNCTION_RUNTIME_VERSION'], - 'APPWRITE_FUNCTION_EVENT' : request.variables['APPWRITE_FUNCTION_EVENT'], - 'APPWRITE_FUNCTION_EVENT_DATA' : request.variables['APPWRITE_FUNCTION_EVENT_DATA'], - 'APPWRITE_FUNCTION_DATA' : request.variables['APPWRITE_FUNCTION_DATA'], - 'APPWRITE_FUNCTION_USER_ID' : request.variables['APPWRITE_FUNCTION_USER_ID'], - 'APPWRITE_FUNCTION_JWT' : request.variables['APPWRITE_FUNCTION_JWT'], - 'APPWRITE_FUNCTION_PROJECT_ID' : request.variables['APPWRITE_FUNCTION_PROJECT_ID'], + 'APPWRITE_FUNCTION_ID' : Platform.environment['APPWRITE_FUNCTION_ID'] ?? '', + 'APPWRITE_FUNCTION_NAME' : Platform.environment['APPWRITE_FUNCTION_NAME'] ?? '', + 'APPWRITE_FUNCTION_DEPLOYMENT' : Platform.environment['APPWRITE_FUNCTION_DEPLOYMENT'] ?? '', + 'APPWRITE_FUNCTION_TRIGGER' : context.req.headers['x-appwrite-trigger'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_NAME' : Platform.environment['APPWRITE_FUNCTION_RUNTIME_NAME'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' : Platform.environment['APPWRITE_FUNCTION_RUNTIME_VERSION'] ?? '', + 'APPWRITE_FUNCTION_EVENT' : context.req.headers['x-appwrite-event'] ?? '', + 'APPWRITE_FUNCTION_EVENT_DATA' : context.req.bodyRaw ?? '', + 'APPWRITE_FUNCTION_DATA' : context.req.bodyRaw ?? '', + 'APPWRITE_FUNCTION_USER_ID' : context.req.headers['x-appwrite-user-id'] ?? '', + 'APPWRITE_FUNCTION_JWT' : context.req.headers['x-appwrite-user-jwt'] ?? '', + 'APPWRITE_FUNCTION_PROJECT_ID' : Platform.environment['APPWRITE_FUNCTION_PROJECT_ID'] ?? '', 'CUSTOM_VARIABLE' : request.variables['CUSTOM_VARIABLE'] }); } \ No newline at end of file diff --git a/tests/resources/functions/node/index.js b/tests/resources/functions/node/index.js index 7f190bcaf5..041e4a8c12 100644 --- a/tests/resources/functions/node/index.js +++ b/tests/resources/functions/node/index.js @@ -1,29 +1,19 @@ -/* - 'req' variable has: - 'headers' - object with request headers - 'payload' - object with request body data - 'variables' - object with function variables - 'res' variable has: - 'send(text, status)' - function to return text response. Status code defaults to 200 - 'json(obj, status)' - function to return JSON response. Status code defaults to 200 +module.exports = async(context) => { + context.log('Amazing Function Log'); - If an error is thrown, a response with code 500 will be returned. -*/ - -module.exports = async(req, res) => { - res.json({ - 'APPWRITE_FUNCTION_ID' : req.variables.APPWRITE_FUNCTION_ID, - 'APPWRITE_FUNCTION_NAME' : req.variables.APPWRITE_FUNCTION_NAME, - 'APPWRITE_FUNCTION_DEPLOYMENT' : req.variables.APPWRITE_FUNCTION_DEPLOYMENT, - 'APPWRITE_FUNCTION_TRIGGER' : req.variables.APPWRITE_FUNCTION_TRIGGER, - 'APPWRITE_FUNCTION_RUNTIME_NAME' : req.variables.APPWRITE_FUNCTION_RUNTIME_NAME, - 'APPWRITE_FUNCTION_RUNTIME_VERSION' : req.variables.APPWRITE_FUNCTION_RUNTIME_VERSION, - 'APPWRITE_FUNCTION_EVENT' : req.variables.APPWRITE_FUNCTION_EVENT, - 'APPWRITE_FUNCTION_EVENT_DATA' : req.variables.APPWRITE_FUNCTION_EVENT_DATA, - 'APPWRITE_FUNCTION_DATA' : req.variables.APPWRITE_FUNCTION_DATA, - 'APPWRITE_FUNCTION_USER_ID' : req.variables.APPWRITE_FUNCTION_USER_ID, - 'APPWRITE_FUNCTION_JWT' : req.variables.APPWRITE_FUNCTION_JWT, - 'APPWRITE_FUNCTION_PROJECT_ID' : req.variables.APPWRITE_FUNCTION_PROJECT_ID, - 'CUSTOM_VARIABLE' : req.variables.CUSTOM_VARIABLE + return context.res.json({ + 'APPWRITE_FUNCTION_ID' : process.env.APPWRITE_FUNCTION_ID ?? '', + 'APPWRITE_FUNCTION_NAME' : process.env.APPWRITE_FUNCTION_NAME ?? '', + 'APPWRITE_FUNCTION_DEPLOYMENT' : process.env.APPWRITE_FUNCTION_DEPLOYMENT ?? '', + 'APPWRITE_FUNCTION_TRIGGER' : context.req.headers['x-appwrite-trigger'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_NAME' : process.env.APPWRITE_FUNCTION_RUNTIME_NAME, + 'APPWRITE_FUNCTION_RUNTIME_VERSION' : process.env.APPWRITE_FUNCTION_RUNTIME_VERSION, + 'APPWRITE_FUNCTION_EVENT' : context.req.headers['x-appwrite-event'] ?? '', + 'APPWRITE_FUNCTION_EVENT_DATA' : context.req.bodyRaw ?? '', + 'APPWRITE_FUNCTION_DATA' : context.req.bodyRaw ?? '', + 'APPWRITE_FUNCTION_USER_ID' : context.req.headers['x-appwrite-user-id'] ?? '', + 'APPWRITE_FUNCTION_JWT' : context.req.headers['x-appwrite-user-jwt'] ?? '', + 'APPWRITE_FUNCTION_PROJECT_ID' : process.env.APPWRITE_FUNCTION_PROJECT_ID, + 'CUSTOM_VARIABLE' : process.env.CUSTOM_VARIABLE }); } \ No newline at end of file diff --git a/tests/resources/functions/php-fn/index.php b/tests/resources/functions/php-fn/index.php index 7947c4a6a6..3eea2d6fea 100644 --- a/tests/resources/functions/php-fn/index.php +++ b/tests/resources/functions/php-fn/index.php @@ -1,20 +1,21 @@ log('Amazing Function Log'); - $response->json([ - 'APPWRITE_FUNCTION_ID' => $request['variables']['APPWRITE_FUNCTION_ID'], - 'APPWRITE_FUNCTION_NAME' => $request['variables']['APPWRITE_FUNCTION_NAME'], - 'APPWRITE_FUNCTION_DEPLOYMENT' => $request['variables']['APPWRITE_FUNCTION_DEPLOYMENT'], - 'APPWRITE_FUNCTION_TRIGGER' => $request['variables']['APPWRITE_FUNCTION_TRIGGER'], - 'APPWRITE_FUNCTION_RUNTIME_NAME' => $request['variables']['APPWRITE_FUNCTION_RUNTIME_NAME'], - 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $request['variables']['APPWRITE_FUNCTION_RUNTIME_VERSION'], - 'APPWRITE_FUNCTION_EVENT' => $request['variables']['APPWRITE_FUNCTION_EVENT'], - 'APPWRITE_FUNCTION_EVENT_DATA' => $request['variables']['APPWRITE_FUNCTION_EVENT_DATA'], - 'APPWRITE_FUNCTION_DATA' => $request['variables']['APPWRITE_FUNCTION_DATA'], - 'APPWRITE_FUNCTION_USER_ID' => $request['variables']['APPWRITE_FUNCTION_USER_ID'], - 'APPWRITE_FUNCTION_JWT' => $request['variables']['APPWRITE_FUNCTION_JWT'], - 'APPWRITE_FUNCTION_PROJECT_ID' => $request['variables']['APPWRITE_FUNCTION_PROJECT_ID'], + return $context->res->json([ + 'APPWRITE_FUNCTION_ID' => \getenv('APPWRITE_FUNCTION_ID') ?: '', + 'APPWRITE_FUNCTION_NAME' => \getenv('APPWRITE_FUNCTION_NAME') ?: '', + 'APPWRITE_FUNCTION_DEPLOYMENT' => \getenv('APPWRITE_FUNCTION_DEPLOYMENT') ?: '', + 'APPWRITE_FUNCTION_TRIGGER' => $context->req->headers['x-appwrite-trigger'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_NAME' => \getenv('APPWRITE_FUNCTION_RUNTIME_NAME') ?: '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => \getenv('APPWRITE_FUNCTION_RUNTIME_VERSION') ?: '', + 'APPWRITE_FUNCTION_EVENT' => $context->req->headers['x-appwrite-event'] ?? '', + 'APPWRITE_FUNCTION_EVENT_DATA' => $context->req->bodyRaw ?? '', + 'APPWRITE_FUNCTION_DATA' => $context->req->bodyRaw ?? '', + 'APPWRITE_FUNCTION_USER_ID' => $context->req->headers['x-appwrite-user-id'] ?? '', + 'APPWRITE_FUNCTION_JWT' => $context->req->headers['x-appwrite-user-jwt'] ?? '', + 'APPWRITE_FUNCTION_PROJECT_ID' => \getenv('APPWRITE_FUNCTION_PROJECT_ID') ?: '', + 'CUSTOM_VARIABLE' => \getenv('CUSTOM_VARIABLE') ?: '', ]); }; diff --git a/tests/resources/functions/php-large/index.php b/tests/resources/functions/php-large/index.php index 84b6a991fe..5a9666488e 100644 --- a/tests/resources/functions/php-large/index.php +++ b/tests/resources/functions/php-large/index.php @@ -1,15 +1,13 @@ json([ - 'APPWRITE_FUNCTION_ID' => $request['variables']['APPWRITE_FUNCTION_ID'], - 'APPWRITE_FUNCTION_NAME' => $request['variables']['APPWRITE_FUNCTION_NAME'], - 'APPWRITE_FUNCTION_DEPLOYMENT' => $request['variables']['APPWRITE_FUNCTION_DEPLOYMENT'], - 'APPWRITE_FUNCTION_TRIGGER' => $request['variables']['APPWRITE_FUNCTION_TRIGGER'], - 'APPWRITE_FUNCTION_RUNTIME_NAME' => $request['variables']['APPWRITE_FUNCTION_RUNTIME_NAME'], - 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $request['variables']['APPWRITE_FUNCTION_RUNTIME_VERSION'], - 'APPWRITE_FUNCTION_EVENT' => $request['variables']['APPWRITE_FUNCTION_EVENT'], - 'APPWRITE_FUNCTION_EVENT_DATA' => $request['variables']['APPWRITE_FUNCTION_EVENT_DATA'], +return function ($context) { + return $context->res->json([ + 'APPWRITE_FUNCTION_ID' => \getenv('APPWRITE_FUNCTION_ID') ?: '', + 'APPWRITE_FUNCTION_NAME' => \getenv('APPWRITE_FUNCTION_NAME') ?: '', + 'APPWRITE_FUNCTION_DEPLOYMENT' => \getenv('APPWRITE_FUNCTION_DEPLOYMENT') ?: '', + 'APPWRITE_FUNCTION_TRIGGER' => $context->req->headers['x-appwrite-trigger'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_NAME' => \getenv('APPWRITE_FUNCTION_RUNTIME_NAME') ?: '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => \getenv('APPWRITE_FUNCTION_RUNTIME_VERSION') ?: '', 'UNICODE_TEST' => "êä" ]); }; diff --git a/tests/resources/functions/php/index.php b/tests/resources/functions/php/index.php index 84b6a991fe..5a9666488e 100644 --- a/tests/resources/functions/php/index.php +++ b/tests/resources/functions/php/index.php @@ -1,15 +1,13 @@ json([ - 'APPWRITE_FUNCTION_ID' => $request['variables']['APPWRITE_FUNCTION_ID'], - 'APPWRITE_FUNCTION_NAME' => $request['variables']['APPWRITE_FUNCTION_NAME'], - 'APPWRITE_FUNCTION_DEPLOYMENT' => $request['variables']['APPWRITE_FUNCTION_DEPLOYMENT'], - 'APPWRITE_FUNCTION_TRIGGER' => $request['variables']['APPWRITE_FUNCTION_TRIGGER'], - 'APPWRITE_FUNCTION_RUNTIME_NAME' => $request['variables']['APPWRITE_FUNCTION_RUNTIME_NAME'], - 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $request['variables']['APPWRITE_FUNCTION_RUNTIME_VERSION'], - 'APPWRITE_FUNCTION_EVENT' => $request['variables']['APPWRITE_FUNCTION_EVENT'], - 'APPWRITE_FUNCTION_EVENT_DATA' => $request['variables']['APPWRITE_FUNCTION_EVENT_DATA'], +return function ($context) { + return $context->res->json([ + 'APPWRITE_FUNCTION_ID' => \getenv('APPWRITE_FUNCTION_ID') ?: '', + 'APPWRITE_FUNCTION_NAME' => \getenv('APPWRITE_FUNCTION_NAME') ?: '', + 'APPWRITE_FUNCTION_DEPLOYMENT' => \getenv('APPWRITE_FUNCTION_DEPLOYMENT') ?: '', + 'APPWRITE_FUNCTION_TRIGGER' => $context->req->headers['x-appwrite-trigger'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_NAME' => \getenv('APPWRITE_FUNCTION_RUNTIME_NAME') ?: '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => \getenv('APPWRITE_FUNCTION_RUNTIME_VERSION') ?: '', 'UNICODE_TEST' => "êä" ]); }; diff --git a/tests/resources/functions/python/main.py b/tests/resources/functions/python/main.py index ff78d6d336..fda0b36f0e 100644 --- a/tests/resources/functions/python/main.py +++ b/tests/resources/functions/python/main.py @@ -1,28 +1,21 @@ import json +import os -# 'req' variable has: -# 'headers' - object with request headers -# 'payload' - object with request body data -# 'variables' - object with function variables -# 'res' variable has: -# 'send(text, status)' - function to return text response. Status code defaults to 200 -# 'json(obj, status)' - function to return JSON response. Status code defaults to 200 -# -# If an error is thrown, a response with code 500 will be returned. +def main(context): + context.log('Amazing Function Log') -def main(request, response): - return response.json({ - 'APPWRITE_FUNCTION_ID' : request.variables['APPWRITE_FUNCTION_ID'], - 'APPWRITE_FUNCTION_NAME' : request.variables['APPWRITE_FUNCTION_NAME'], - 'APPWRITE_FUNCTION_DEPLOYMENT' : request.variables['APPWRITE_FUNCTION_DEPLOYMENT'], - 'APPWRITE_FUNCTION_TRIGGER' : request.variables['APPWRITE_FUNCTION_TRIGGER'], - 'APPWRITE_FUNCTION_RUNTIME_NAME' : request.variables['APPWRITE_FUNCTION_RUNTIME_NAME'], - 'APPWRITE_FUNCTION_RUNTIME_VERSION' : request.variables['APPWRITE_FUNCTION_RUNTIME_VERSION'], - 'APPWRITE_FUNCTION_EVENT' : request.variables['APPWRITE_FUNCTION_EVENT'], - 'APPWRITE_FUNCTION_EVENT_DATA' : request.variables['APPWRITE_FUNCTION_EVENT_DATA'], - 'APPWRITE_FUNCTION_DATA' : request.variables['APPWRITE_FUNCTION_DATA'], - 'APPWRITE_FUNCTION_USER_ID' : request.variables['APPWRITE_FUNCTION_USER_ID'], - 'APPWRITE_FUNCTION_JWT' : request.variables['APPWRITE_FUNCTION_JWT'], - 'APPWRITE_FUNCTION_PROJECT_ID' : request.variables['APPWRITE_FUNCTION_PROJECT_ID'], - 'CUSTOM_VARIABLE' : request.variables['CUSTOM_VARIABLE'], + return context.res.json({ + 'APPWRITE_FUNCTION_ID' : os.environ.get('APPWRITE_FUNCTION_ID',''), + 'APPWRITE_FUNCTION_NAME' : os.environ.get('APPWRITE_FUNCTION_NAME',''), + 'APPWRITE_FUNCTION_DEPLOYMENT' : os.environ.get('APPWRITE_FUNCTION_DEPLOYMENT',''), + 'APPWRITE_FUNCTION_TRIGGER' : context.req.headers.get('x-appwrite-trigger', ''), + 'APPWRITE_FUNCTION_RUNTIME_NAME' : os.environ.get('APPWRITE_FUNCTION_RUNTIME_NAME',''), + 'APPWRITE_FUNCTION_RUNTIME_VERSION' : os.environ.get('APPWRITE_FUNCTION_RUNTIME_VERSION',''), + 'APPWRITE_FUNCTION_EVENT' : context.req.headers.get('x-appwrite-event', ''), + 'APPWRITE_FUNCTION_EVENT_DATA' : context.req.body_raw, + 'APPWRITE_FUNCTION_DATA' : context.req.body_raw, + 'APPWRITE_FUNCTION_USER_ID' : context.req.headers.get('x-appwrite-user-id', ''), + 'APPWRITE_FUNCTION_JWT' : context.req.headers.get('x-appwrite-user-jwt', ''), + 'APPWRITE_FUNCTION_PROJECT_ID' : os.environ.get('APPWRITE_FUNCTION_PROJECT_ID',''), + 'CUSTOM_VARIABLE' : os.environ.get('CUSTOM_VARIABLE',''), }) \ No newline at end of file diff --git a/tests/resources/functions/ruby/main.rb b/tests/resources/functions/ruby/main.rb index d6ccdfb073..c14f591fa1 100644 --- a/tests/resources/functions/ruby/main.rb +++ b/tests/resources/functions/ruby/main.rb @@ -1,29 +1,19 @@ -=begin - 'req' variable has: - 'headers' - object with request headers - 'payload' - object with request body data - 'variables' - object with function variables - 'res' variable has: - 'send(text, status)' - function to return text response. Status code defaults to 200 - 'json(obj, status)' - function to return JSON response. Status code defaults to 200 - - If an error is thrown, a response with code 500 will be returned. -=end +def main(context) + context.log('Amazing Function Log') -def main(request, response) - return response.json({ - 'APPWRITE_FUNCTION_ID' => request.variables['APPWRITE_FUNCTION_ID'], - 'APPWRITE_FUNCTION_NAME' => request.variables['APPWRITE_FUNCTION_NAME'], - 'APPWRITE_FUNCTION_DEPLOYMENT' => request.variables['APPWRITE_FUNCTION_DEPLOYMENT'], - 'APPWRITE_FUNCTION_TRIGGER' => request.variables['APPWRITE_FUNCTION_TRIGGER'], - 'APPWRITE_FUNCTION_RUNTIME_NAME' => request.variables['APPWRITE_FUNCTION_RUNTIME_NAME'], - 'APPWRITE_FUNCTION_RUNTIME_VERSION' => request.variables['APPWRITE_FUNCTION_RUNTIME_VERSION'], - 'APPWRITE_FUNCTION_EVENT' => request.variables['APPWRITE_FUNCTION_EVENT'], - 'APPWRITE_FUNCTION_EVENT_DATA' => request.variables['APPWRITE_FUNCTION_EVENT_DATA'], - 'APPWRITE_FUNCTION_DATA' => request.variables['APPWRITE_FUNCTION_DATA'], - 'APPWRITE_FUNCTION_USER_ID' => request.variables['APPWRITE_FUNCTION_USER_ID'], - 'APPWRITE_FUNCTION_JWT' => request.variables['APPWRITE_FUNCTION_JWT'], - 'APPWRITE_FUNCTION_PROJECT_ID' => request.variables['APPWRITE_FUNCTION_PROJECT_ID'], - 'CUSTOM_VARIABLE' => request.variables['CUSTOM_VARIABLE'] + return context.res.json({ + 'APPWRITE_FUNCTION_ID' => ENV['APPWRITE_FUNCTION_ID'] || '', + 'APPWRITE_FUNCTION_NAME' => ENV['APPWRITE_FUNCTION_NAME'] || '', + 'APPWRITE_FUNCTION_DEPLOYMENT' => ENV['APPWRITE_FUNCTION_DEPLOYMENT'] || '', + 'APPWRITE_FUNCTION_TRIGGER' => context.req.headers['x-appwrite-trigger'] || '', + 'APPWRITE_FUNCTION_RUNTIME_NAME' => ENV['APPWRITE_FUNCTION_RUNTIME_NAME'] || '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => ENV['APPWRITE_FUNCTION_RUNTIME_VERSION'] || '', + 'APPWRITE_FUNCTION_EVENT' => context.req.headers['x-appwrite-event'] || '', + 'APPWRITE_FUNCTION_EVENT_DATA' => context.req.body_raw || '', + 'APPWRITE_FUNCTION_DATA' => context.req.body_raw || '', + 'APPWRITE_FUNCTION_USER_ID' => context.req.headers['x-appwrite-user-id'] || '', + 'APPWRITE_FUNCTION_JWT' => context.req.headers['x-appwrite-user-jwt'] || '', + 'APPWRITE_FUNCTION_PROJECT_ID' => ENV['APPWRITE_FUNCTION_PROJECT_ID'] || '', + 'CUSTOM_VARIABLE' => ENV['CUSTOM_VARIABLE'] || '' }) end \ No newline at end of file diff --git a/tests/resources/functions/timeout/index.php b/tests/resources/functions/timeout/index.php index c45ab5a5b8..c9aedb3a30 100644 --- a/tests/resources/functions/timeout/index.php +++ b/tests/resources/functions/timeout/index.php @@ -1,5 +1,6 @@ res->send('OK'); }; diff --git a/tests/unit/Migration/MigrationTest.php b/tests/unit/Migration/MigrationTest.php index 13f9b9a3f5..536278d55b 100644 --- a/tests/unit/Migration/MigrationTest.php +++ b/tests/unit/Migration/MigrationTest.php @@ -47,92 +47,4 @@ abstract class MigrationTest extends TestCase $this->assertArrayHasKey(APP_VERSION_STABLE, Migration::$versions); } } - - public function testHasDifference(): void - { - $this->assertFalse(Migration::hasDifference([], [])); - $this->assertFalse(Migration::hasDifference([ - 'bool' => true, - 'string' => 'abc', - 'int' => 123, - 'array' => ['a', 'b', 'c'], - 'assoc' => [ - 'a' => true, - 'b' => 'abc', - 'c' => 123, - 'd' => ['a', 'b', 'c'] - ] - ], [ - 'bool' => true, - 'string' => 'abc', - 'int' => 123, - 'array' => ['a', 'b', 'c'], - 'assoc' => [ - 'a' => true, - 'b' => 'abc', - 'c' => 123, - 'd' => ['a', 'b', 'c'] - ] - ])); - $this->assertFalse(Migration::hasDifference([ - 'bool' => true, - 'string' => 'abc', - 'int' => 123, - 'array' => ['a', 'b', 'c'], - 'assoc' => [ - 'a' => true, - 'b' => 'abc', - 'c' => 123, - 'd' => ['a', 'b', 'c'] - ] - ], [ - 'string' => 'abc', - 'assoc' => [ - 'a' => true, - 'b' => 'abc', - 'c' => 123, - 'd' => ['a', 'b', 'c'] - ], - 'int' => 123, - 'array' => ['a', 'b', 'c'], - 'bool' => true, - - ])); - $this->assertTrue(Migration::hasDifference([ - 'a' => true - ], [ - 'b' => true - ])); - $this->assertTrue(Migration::hasDifference([ - 'a' => 'true' - ], [ - 'a' => true - ])); - $this->assertTrue(Migration::hasDifference([ - 'a' => true - ], [ - 'a' => false - ])); - $this->assertTrue(Migration::hasDifference([ - 'nested' => [ - 'a' => true - ] - ], [ - 'nested' => [] - ])); - $this->assertTrue(Migration::hasDifference([ - 'assoc' => [ - 'bool' => true, - 'string' => 'abc', - 'int' => 123, - 'array' => ['a', 'b', 'c'] - ] - ], [ - 'nested' => [ - 'a' => true, - 'int' => '123', - 'array' => ['a', 'b', 'c'] - ] - ])); - } } diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index 0c9914f4bd..f021841396 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -2,53 +2,70 @@ namespace Tests\Unit\Usage; -use Appwrite\URL\URL as AppwriteURL; +use Appwrite\Usage\Stats; use PHPUnit\Framework\TestCase; use Utopia\App; -use Utopia\DSN\DSN; -use Utopia\Queue; -use Utopia\Queue\Client; -use Utopia\Queue\Connection; class StatsTest extends TestCase { - protected ?Connection $connection = null; - protected ?Client $client = null; - - protected const QUEUE_NAME = 'usage-test-q'; + /** + * @var Stats + */ + protected $object = null; public function setUp(): void { - $env = App::getEnv('_APP_CONNECTIONS_QUEUE', AppwriteURL::unparse([ - 'scheme' => 'redis', - 'host' => App::getEnv('_APP_REDIS_HOST', 'redis'), - 'port' => App::getEnv('_APP_REDIS_PORT', '6379'), - 'user' => App::getEnv('_APP_REDIS_USER', ''), - 'pass' => App::getEnv('_APP_REDIS_PASS', ''), - ])); + $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); + $port = App::getEnv('_APP_STATSD_PORT', 8125); - $dsn = explode('=', $env); - $dsn = $dsn[1] ?? ''; - $dsn = new DSN($dsn); - $this->connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); - $this->client = new Client(self::QUEUE_NAME, $this->connection); + $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); + $statsd = new \Domnikl\Statsd\Client($connection); + + $this->object = new Stats($statsd); } public function tearDown(): void { } - public function testSamePayload(): void + public function testNamespace(): void { - $inToQueue = [ - 'key_1' => 'value_1', - 'key_2' => 'value_2', - ]; + $this->object->setNamespace('appwritetest.usage'); + $this->assertEquals('appwritetest.usage', $this->object->getNamespace()); + } - $result = $this->client->enqueue($inToQueue); - $this->assertTrue($result); - $outFromQueue = $this->connection->leftPopArray('utopia-queue.queue.' . self::QUEUE_NAME, 0)['payload']; - $this->assertNotEmpty($outFromQueue); - $this->assertSame($inToQueue, $outFromQueue); + public function testParams(): void + { + $this->object + ->setParam('projectId', 'appwrite_test') + ->setParam('projectInternalId', 1) + ->setParam('networkRequestSize', 100) + ; + + $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); + $this->assertEquals(1, $this->object->getParam('projectInternalId')); + $this->assertEquals(100, $this->object->getParam('networkRequestSize')); + + $this->object->submit(); + + $this->assertEquals(null, $this->object->getParam('projectId')); + $this->assertEquals(null, $this->object->getParam('networkRequestSize')); + } + + public function testReset(): void + { + $this->object + ->setParam('projectId', 'appwrite_test') + ->setParam('networkRequestSize', 100) + ; + + $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); + $this->assertEquals(100, $this->object->getParam('networkRequestSize')); + + $this->object->reset(); + + $this->assertEquals(null, $this->object->getParam('projectId')); + $this->assertEquals(null, $this->object->getParam('networkRequestSize')); + $this->assertEquals('appwrite.usage', $this->object->getNamespace()); } } diff --git a/tests/unit/Utopia/Request/Filters/V16Test.php b/tests/unit/Utopia/Request/Filters/V16Test.php new file mode 100644 index 0000000000..25b97a0ce4 --- /dev/null +++ b/tests/unit/Utopia/Request/Filters/V16Test.php @@ -0,0 +1,51 @@ +filter = new V16(); + } + + public function tearDown(): void + { + } + + public function createExecutionProvider(): array + { + return [ + 'data' => [ + [ + 'data' => 'Lorem ipsum' + ], + [ + 'body' => 'Lorem ipsum' + ], + ], + ]; + } + + /** + * @dataProvider createExecutionProvider + */ + public function testCreateExecution(array $content, array $expected): void + { + $model = 'functions.createExecution'; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } +} diff --git a/tests/unit/Utopia/Response/Filters/V16Test.php b/tests/unit/Utopia/Response/Filters/V16Test.php new file mode 100644 index 0000000000..fba3b69535 --- /dev/null +++ b/tests/unit/Utopia/Response/Filters/V16Test.php @@ -0,0 +1,228 @@ +filter = new V16(); + } + + public function tearDown(): void + { + } + + public function deploymentProvider(): array + { + return [ + 'buildStdout and buildStderr' => [ + [ + 'buildLogs' => 'Compiling source files...', + ], + [ + 'buildStdout' => 'Compiling source files...', + 'buildStderr' => '', + ], + ], + ]; + } + + /** + * @dataProvider deploymentProvider + */ + public function testDeployment(array $content, array $expected): void + { + $model = Response::MODEL_DEPLOYMENT; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } + + public function executionProvider(): array + { + return [ + 'statusCode' => [ + [ + 'responseStatusCode' => 200, + ], + [ + 'statusCode' => 200, + ], + ], + 'response' => [ + [ + 'responseBody' => 'Sample response.', + ], + [ + 'response' => 'Sample response.', + ], + ], + 'stdout' => [ + [ + 'logs' => 'Sample log.', + ], + [ + 'stdout' => 'Sample log.', + ], + ], + 'stderr' => [ + [ + 'errors' => 'Sample error.', + ], + [ + 'stderr' => 'Sample error.', + ], + ], + ]; + } + + /** + * @dataProvider executionProvider + */ + public function testExecution(array $content, array $expected): void + { + $model = Response::MODEL_EXECUTION; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } + + public function functionProvider(): array + { + return [ + 'empty schedule' => [ + [ + 'schedule' => '', + ], + [ + 'schedule' => '', + 'schedulePrevious' => '', + 'scheduleNext' => '', + ], + ], + ]; + } + + /** + * @dataProvider functionProvider + */ + public function testFunction(array $content, array $expected): void + { + $model = Response::MODEL_FUNCTION; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } + + public function testFunctionSchedulePreviousScheduleNext(): void + { + $model = Response::MODEL_FUNCTION; + + $content = [ + 'schedule' => '0 * * * *', + ]; + + $cron = new CronExpression($content['schedule']); + + $expected = [ + 'schedule' => '0 * * * *', + 'scheduleNext' => DateTime::formatTz(DateTime::format($cron->getNextRunDate())), + 'schedulePrevious' => DateTime::formatTz(DateTime::format($cron->getPreviousRunDate())), + ]; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } + + public function projectProvider(): array + { + return [ + 'providers' => [ + [ + 'providers' => [ + [ + 'key' => 'github', + 'name' => 'GitHub', + 'appId' => 'client_id', + 'secret' => 'client_secret', + 'enabled' => true, + ], + ], + ], + [ + 'providers' => [ + [ + 'name' => 'Github', + 'appId' => 'client_id', + 'secret' => 'client_secret', + 'enabled' => true, + ], + ], + 'domains' => [], + ], + ], + 'domains' => [ + [ + ], + [ + 'domains' => [], + ], + ], + ]; + } + + /** + * @dataProvider projectProvider + */ + public function testProject(array $content, array $expected): void + { + $model = Response::MODEL_PROJECT; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } + + public function variableProvider(): array + { + return [ + 'functionId' => [ + [ + 'resourceId' => '5e5ea5c16897e', + ], + [ + 'functionId' => '5e5ea5c16897e', + ], + ], + ]; + } + + /** + * @dataProvider variableProvider + */ + public function testVariable(array $content, array $expected): void + { + $model = Response::MODEL_VARIABLE; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } +} From b7119a2718a48512312451c84d867f5bdbd71dd6 Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Tue, 12 Sep 2023 21:03:44 +0530 Subject: [PATCH 2/3] review changes --- app/config/collections.php | 111 +++++++++++++++++++++++++------------ app/config/roles.php | 16 +++++- app/config/scopes.php | 2 +- app/init.php | 41 +++++++++++++- 4 files changed, 131 insertions(+), 39 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 79f1622574..2c298e986c 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1437,22 +1437,61 @@ $commonCollections = [ 'default' => null, 'array' => false, 'filters' => ['json', 'encrypt'], - ] + ], + [ + '$id' => ID::custom('search'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 65535, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], ], 'indexes' => [ [ '$id' => ID::custom('_key_provider'), 'type' => Database::INDEX_KEY, 'attributes' => ['provider'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_name'), 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['name'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_type'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['type'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_default'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['default'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_default_type'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['default, type'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_search'), + 'type' => Database::INDEX_FULLTEXT, + 'attributes' => ['search'], + 'lengths' => [], + 'orders' => [], ] ], ], @@ -1484,24 +1523,13 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], - [ - '$id' => ID::custom('type'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 128, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], [ '$id' => ID::custom('data'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 16384, + 'size' => 65535, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => ['json'], @@ -1510,7 +1538,7 @@ $commonCollections = [ '$id' => ID::custom('to'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 16834, + 'size' => 65535, 'signed' => true, 'required' => true, 'default' => null, @@ -1529,14 +1557,14 @@ $commonCollections = [ 'filters' => ['datetime'], ], [ - '$id' => ID::custom('deliveryError'), + '$id' => ID::custom('deliveryErrors'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 2048, + 'size' => 65535, 'signed' => true, 'required' => false, 'default' => null, - 'array' => false, + 'array' => true, 'filters' => [], ], [ @@ -1545,7 +1573,7 @@ $commonCollections = [ 'format' => '', 'size' => 0, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -1556,7 +1584,7 @@ $commonCollections = [ 'format' => '', 'size' => 0, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => false, 'array' => false, 'filters' => [], @@ -1578,14 +1606,14 @@ $commonCollections = [ '$id' => ID::custom('_key_providerId'), 'type' => Database::INDEX_KEY, 'attributes' => ['providerId'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_providerInternalId'), 'type' => Database::INDEX_KEY, 'attributes' => ['providerInternalId'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -1657,21 +1685,32 @@ $commonCollections = [ 'default' => null, 'array' => false, 'filters' => ['subQueryTopicTargets'], - ] + ], + [ + '$id' => ID::custom('search'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], ], 'indexes' => [ [ '$id' => ID::custom('_key_providerId'), 'type' => Database::INDEX_KEY, 'attributes' => ['providerId'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_providerInternalId'), 'type' => Database::INDEX_KEY, 'attributes' => ['providerInternalId'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -1682,12 +1721,12 @@ $commonCollections = [ 'orders' => [], ], [ - '$id' => ID::custom('_key_description'), + '$id' => ID::custom('_key_search'), 'type' => Database::INDEX_FULLTEXT, - 'attributes' => ['description'], + 'attributes' => ['name'], 'lengths' => [], - 'orders' => [], - ], + 'orders' => [Database::ORDER_ASC], + ] ], ], @@ -1823,7 +1862,7 @@ $commonCollections = [ 'filters' => [], ], [ - '$id' => ID::custom('providerType'), + '$id' => ID::custom('provider'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => Database::LENGTH_KEY, @@ -1831,7 +1870,7 @@ $commonCollections = [ 'required' => false, 'default' => null, 'array' => false, - 'filters' => ['subQueryProviderType'], + 'filters' => ['subQueryProvider'], ], [ '$id' => ID::custom('identifier'), @@ -1850,14 +1889,14 @@ $commonCollections = [ '$id' => ID::custom('_key_userId'), 'type' => Database::INDEX_KEY, 'attributes' => ['userId'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_userInternalId'), 'type' => Database::INDEX_KEY, 'attributes' => ['userInternalId'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -5516,4 +5555,4 @@ $collections = [ 'databases' => $dbCollections ]; -return $collections; +return $collections; \ No newline at end of file diff --git a/app/config/roles.php b/app/config/roles.php index abc00b55bf..3ce716d27e 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -21,6 +21,10 @@ $member = [ 'avatars.read', 'execution.read', 'execution.write', + 'targets.read', + 'targets.write', + 'subscribers.write', + 'subscribers.read' ]; $admins = [ @@ -60,6 +64,16 @@ $admins = [ 'vcs.read', 'vcs.write', 'assistant.read', + 'targets.read', + 'targets.write', + 'providers.write', + 'providers.read', + 'messages.write', + 'messages.read', + 'topics.write', + 'topics.read', + 'subscribers.write', + 'subscribers.read' ]; return [ @@ -99,4 +113,4 @@ return [ 'label' => 'Applications', 'scopes' => ['global', 'health.read', 'graphql'], ], -]; +]; \ No newline at end of file diff --git a/app/config/scopes.php b/app/config/scopes.php index ddc1de21f3..af27865b0a 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -127,4 +127,4 @@ return [ // List of publicly visible scopes 'assistant.read' => [ 'description' => 'Access to read the Assistant service', ], -]; +]; \ No newline at end of file diff --git a/app/init.php b/app/init.php index f2d7bc7db4..c10d9deaaa 100644 --- a/app/init.php +++ b/app/init.php @@ -543,6 +543,45 @@ Database::addFilter( ])); } ); + +Database::addFilter( + 'subQueryProvider', + function (mixed $value) { + return null; + }, + function (mixed $value, Document $document, Database $database) { + $provider = Authorization::skip(fn () => $database + ->getDocument( + 'providers', + $document->getAttribute('providerId'), + )); + if (!$provider->isEmpty()) { + return $provider; + } + return null; + } +); + +Database::addFilter( + 'subQueryTopicTargets', + function (mixed $value) { + return null; + }, + function (mixed $value, Document $document, Database $database) { + $targetIds = Authorization::skip(fn () => \array_map( + fn ($document) => $document->getAttribute('targetId'), + $database + ->find('subscribers', [ + Query::equal('topicInternalId', [$document->getInternalId()]), + Query::limit(APP_LIMIT_SUBQUERY), + ]) + )); + if (\count($targetIds) > 0) { + return $database->find('targets', [Query::equal('$id', $targetIds)]); + } + return []; + } +); /** * DB Formats */ @@ -1453,4 +1492,4 @@ App::setResource('requestTimestamp', function ($request) { } } return $requestTimestamp; -}, ['request']); +}, ['request']); \ No newline at end of file From 2f2875e3c0929e6d719420937ef5f2422496667e Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Tue, 12 Sep 2023 21:19:21 +0530 Subject: [PATCH 3/3] lint fix --- app/config/collections.php | 2 +- app/config/roles.php | 2 +- app/init.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 2c298e986c..fd101ac440 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -5555,4 +5555,4 @@ $collections = [ 'databases' => $dbCollections ]; -return $collections; \ No newline at end of file +return $collections; diff --git a/app/config/roles.php b/app/config/roles.php index 3ce716d27e..6e09d838de 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -113,4 +113,4 @@ return [ 'label' => 'Applications', 'scopes' => ['global', 'health.read', 'graphql'], ], -]; \ No newline at end of file +]; diff --git a/app/init.php b/app/init.php index c10d9deaaa..072384919b 100644 --- a/app/init.php +++ b/app/init.php @@ -1492,4 +1492,4 @@ App::setResource('requestTimestamp', function ($request) { } } return $requestTimestamp; -}, ['request']); \ No newline at end of file +}, ['request']);